Skip to content

Commit

Permalink
fix: add json tags for the transport profiles in statistics (#4803)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsternberg authored May 27, 2022
1 parent e107c96 commit 892defc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions query.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type Statistics struct {
TotalAllocated int64 `json:"total_allocated"`

// Profiles holds the profiles for each transport (source/transformation) in this query.
Profiles []TransportProfile
Profiles []TransportProfile `json:"profiles"`

// RuntimeErrors contains error messages that happened during the execution of the query.
RuntimeErrors []string `json:"runtime_errors"`
Expand Down Expand Up @@ -113,25 +113,25 @@ func (s *Statistics) Merge(other Statistics) {
type TransportProfile struct {
// NodeType holds the node type which is a string representation
// of the underlying transformation.
NodeType string
NodeType string `json:"node_type"`

// Label holds the plan node label.
Label string
Label string `json:"label"`

// Count holds the number of spans in this profile.
Count int64
Count int64 `json:"count"`

// Min holds the minimum span time of this profile.
Min int64
Min int64 `json:"min"`

// Max holds the maximum span time of this profile.
Max int64
Max int64 `json:"max"`

// Sum holds the sum of all span times for this profile.
Sum int64
Sum int64 `json:"sum"`

// Mean is the mean span time of this profile.
Mean float64
Mean float64 `json:"mean"`
}

// StartSpan will start a profile span to be recorded.
Expand Down

0 comments on commit 892defc

Please sign in to comment.