Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run SLO Tests on push master #1532

Merged
merged 4 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading