-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8947 from influxdata/sgc-explain
EXPLAIN ANALYZE implementation
- Loading branch information
Showing
64 changed files
with
3,997 additions
and
438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package metrics | ||
|
||
import "context" | ||
|
||
type key int | ||
|
||
const ( | ||
groupKey key = iota | ||
) | ||
|
||
// NewContextWithGroup returns a new context with the given Group added. | ||
func NewContextWithGroup(ctx context.Context, c *Group) context.Context { | ||
return context.WithValue(ctx, groupKey, c) | ||
} | ||
|
||
// GroupFromContext returns the Group associated with ctx or nil if no Group has been assigned. | ||
func GroupFromContext(ctx context.Context) *Group { | ||
c, _ := ctx.Value(groupKey).(*Group) | ||
return c | ||
} |
Oops, something went wrong.