Skip to content

Commit

Permalink
fix: use summary metric
Browse files Browse the repository at this point in the history
  • Loading branch information
vsukhin committed Mar 26, 2024
1 parent f0853ec commit 54435a3
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions internal/app/api/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@ var testExecutionsCount = promauto.NewCounterVec(prometheus.CounterOpts{
Help: "The total number of test executions",
}, []string{"type", "name", "result", "labels", "test_uri"})

var testExecutionsDurationMs = promauto.NewHistogramVec(prometheus.HistogramOpts{
Name: "testkube_test_executions_duration_ms",
Help: "The duration of test executions",
var testExecutionsDurationMs = promauto.NewSummaryVec(prometheus.SummaryOpts{
Name: "testkube_test_executions_duration_ms",
Help: "The duration of test executions",
Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.95: 0.005, 0.99: 0.001},
}, []string{"type", "name", "result", "labels", "test_uri"})

var testSuiteExecutionsCount = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "testkube_testsuite_executions_count",
Help: "The total number of test suite executions",
}, []string{"name", "result", "labels", "testsuite_uri"})

var testSuiteExecutionsDurationMs = promauto.NewHistogramVec(prometheus.HistogramOpts{
Name: "testkube_testsuite_executions_duration_ms",
Help: "The duration of test suite executions",
var testSuiteExecutionsDurationMs = promauto.NewSummaryVec(prometheus.SummaryOpts{
Name: "testkube_testsuite_executions_duration_ms",
Help: "The duration of test suite executions",
Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.95: 0.005, 0.99: 0.001},
}, []string{"name", "result", "labels", "testsuite_uri"})

var testCreationCount = promauto.NewCounterVec(prometheus.CounterOpts{
Expand Down Expand Up @@ -138,9 +140,9 @@ func NewMetrics() Metrics {

type Metrics struct {
TestExecutionsCount *prometheus.CounterVec
TestExecutionsDurationMs *prometheus.HistogramVec
TestExecutionsDurationMs *prometheus.SummaryVec
TestSuiteExecutionsCount *prometheus.CounterVec
TestSuiteExecutionsDurationMs *prometheus.HistogramVec
TestSuiteExecutionsDurationMs *prometheus.SummaryVec
TestCreations *prometheus.CounterVec
TestSuiteCreations *prometheus.CounterVec
TestUpdates *prometheus.CounterVec
Expand Down

0 comments on commit 54435a3

Please sign in to comment.