Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Vault
Commits
f5dded73
Unverified
Commit
f5dded73
authored
3 years ago
by
swayne275
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
enhance test metrics (#13262)
parent
91407e19
Branches unavailable
v1.10.2
v1.10.1
v1.10.0
v1.10.0-rc1
sdk/v0.4.1
sdk/v0.4.0
last-go-modable
api/v1.5.0
api/v1.4.1
api/v1.4.0
api/v1.3.1
api/auth/ldap/v0.1.0
api/auth/approle/v0.1.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
helper/testhelpers/testhelpers.go
+34
-3
helper/testhelpers/testhelpers.go
with
34 additions
and
3 deletions
+34
-3
helper/testhelpers/testhelpers.go
+
34
-
3
View file @
f5dded73
...
...
@@ -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
Gauge
JSON
struct
{
type
baseInfo
JSON
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.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help