Skip to content

Commit

Permalink
Merge pull request #1532 from ydb-platform/ci-run-slo-on-push-master
Browse files Browse the repository at this point in the history
Run SLO Tests on push master
  • Loading branch information
asmyasnikov authored Oct 26, 2024
2 parents 3ecd6b9 + 238cd6a commit 17a901b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/slo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: slo

on:
push:
branches:
- master
pull_request:
branches:
- master
Expand Down Expand Up @@ -81,8 +84,11 @@ jobs:
./tests/slo/.bin/${{matrix.sdk.id}}_linux_amd64 create grpc://localhost:2135 /Root/testdb
./tests/slo/.bin/${{matrix.sdk.id}}_linux_amd64 run grpc://localhost:2135 /Root/testdb \
-prom-pgw localhost:9091 \
-report-period 500 \
-report-period 250 \
-time ${{inputs.slo_workload_duration_seconds || 600}} \
-read-rps ${{inputs.slo_workload_read_max_rps || 1000}} \
-write-rps ${{inputs.slo_workload_write_max_rps || 100}}
-write-rps ${{inputs.slo_workload_write_max_rps || 100}} \
-read-timeout 10000 \
-write-timeout 10000 \
-shutdown-time 30
./tests/slo/.bin/${{matrix.sdk.id}}_linux_amd64 cleanup grpc://localhost:2135 /Root/testdb
19 changes: 9 additions & 10 deletions tests/slo/internal/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ type (
retriesFailureTotal *prometheus.CounterVec

pendingOperations *prometheus.GaugeVec
// TODO:
// sdk_cpu_usage_seconds_total *prometheus.CounterVec
// sdk_memory_usage_bytes *prometheus.GaugeVec
// sdk_connections_open *prometheus.GaugeVec
Expand All @@ -54,39 +53,39 @@ func New(url, ref, label, jobName string) (*Metrics, error) {
}

m.errorsTotal = prometheus.NewCounterVec(
prometheus.CounterOpts{ //nolint:promlinter
prometheus.CounterOpts{
Name: "sdk_errors_total",
Help: "Total number of errors encountered, categorized by error type.",
},
[]string{"error_type"},
)

m.operationsTotal = prometheus.NewCounterVec(
prometheus.CounterOpts{ //nolint:promlinter
prometheus.CounterOpts{
Name: "sdk_operations_total",
Help: "Total number of operations, categorized by type attempted by the SDK.",
},
[]string{"operation_type"},
)

m.operationsSuccessTotal = prometheus.NewCounterVec(
prometheus.CounterOpts{ //nolint:promlinter
prometheus.CounterOpts{
Name: "sdk_operations_success_total",
Help: "Total number of successful operations, categorized by type.",
},
[]string{"operation_type"},
)

m.operationsFailureTotal = prometheus.NewCounterVec(
prometheus.CounterOpts{ //nolint:promlinter
prometheus.CounterOpts{
Name: "sdk_operations_failure_total",
Help: "Total number of failed operations, categorized by type.",
},
[]string{"operation_type"},
)

m.operationLatencySeconds = prometheus.NewHistogramVec(
prometheus.HistogramOpts{ //nolint:promlinter
prometheus.HistogramOpts{
Name: "sdk_operation_latency_seconds",
Help: "Latency of operations performed by the SDK in seconds, categorized by type and status.",
Buckets: []float64{
Expand All @@ -109,31 +108,31 @@ func New(url, ref, label, jobName string) (*Metrics, error) {
)

m.retryAttemptsTotal = prometheus.NewCounterVec(
prometheus.CounterOpts{ //nolint:promlinter
prometheus.CounterOpts{
Name: "sdk_retry_attempts_total",
Help: "Total number of retry attempts, categorized by operation type.",
},
[]string{"operation_type"},
)

m.retriesSuccessTotal = prometheus.NewCounterVec(
prometheus.CounterOpts{ //nolint:promlinter
prometheus.CounterOpts{
Name: "sdk_retries_success_total",
Help: "Total number of successful retries, categorized by operation type.",
},
[]string{"operation_type"},
)

m.retriesFailureTotal = prometheus.NewCounterVec(
prometheus.CounterOpts{ //nolint:promlinter
prometheus.CounterOpts{
Name: "sdk_retries_failure_total",
Help: "Total number of failed retries, categorized by operation type.",
},
[]string{"operation_type"},
)

m.pendingOperations = prometheus.NewGaugeVec(
prometheus.GaugeOpts{ //nolint:promlinter
prometheus.GaugeOpts{
Name: "sdk_pending_operations",
Help: "Current number of pending operations, categorized by type.",
},
Expand Down

0 comments on commit 17a901b

Please sign in to comment.