Unverified Commit f5dded73 authored by swayne275's avatar swayne275 Committed by GitHub
Browse files

enhance test metrics (#13262)

Showing with 34 additions and 3 deletions
+34 -3
......@@ -690,15 +690,46 @@ func SysMetricsReq(client *api.Client, cluster *vault.TestCluster, unauth bool)
}
type SysMetricsJSON struct {
Gauges []GaugeJSON `json:"Gauges"`
Gauges []gaugeJSON `json:"Gauges"`
Counters []counterJSON `json:"Counters"`
// note: this is referred to as a "Summary" type in our telemetry docs, but
// the field name in the JSON is "Samples"
Summaries []summaryJSON `json:"Samples"`
}
type GaugeJSON struct {
type baseInfoJSON struct {
Name string `json:"Name"`
Value int `json:"Value"`
Labels map[string]interface{} `json:"Labels"`
}
type gaugeJSON struct {
baseInfoJSON
Value int `json:"Value"`
}
type counterJSON struct {
baseInfoJSON
Count int `json:"Count"`
Rate float64 `json:"Rate"`
Sum int `json:"Sum"`
Min int `json:"Min"`
Max int `json:"Max"`
Mean float64 `json:"Mean"`
Stddev float64 `json:"Stddev"`
}
type summaryJSON struct {
baseInfoJSON
Count int `json:"Count"`
Rate float64 `json:"Rate"`
Sum float64 `json:"Sum"`
Min float64 `json:"Min"`
Max float64 `json:"Max"`
Mean float64 `json:"Mean"`
Stddev float64 `json:"Stddev"`
}
// SetNonRootToken sets a token on :client: with a fairly generic policy.
// This is useful if a test needs to examine differing behavior based on if a
// root token is passed with the request.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment