Skip to content

Commit 892defc

Browse files
authoredMay 27, 2022
fix: add json tags for the transport profiles in statistics (#4803)
1 parent e107c96 commit 892defc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
 

‎query.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ type Statistics struct {
5757
TotalAllocated int64 `json:"total_allocated"`
5858

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

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

118118
// Label holds the plan node label.
119-
Label string
119+
Label string `json:"label"`
120120

121121
// Count holds the number of spans in this profile.
122-
Count int64
122+
Count int64 `json:"count"`
123123

124124
// Min holds the minimum span time of this profile.
125-
Min int64
125+
Min int64 `json:"min"`
126126

127127
// Max holds the maximum span time of this profile.
128-
Max int64
128+
Max int64 `json:"max"`
129129

130130
// Sum holds the sum of all span times for this profile.
131-
Sum int64
131+
Sum int64 `json:"sum"`
132132

133133
// Mean is the mean span time of this profile.
134-
Mean float64
134+
Mean float64 `json:"mean"`
135135
}
136136

137137
// StartSpan will start a profile span to be recorded.

0 commit comments

Comments
 (0)