Skip to content

Commit

Permalink
add custom exporter into related deployments.
Browse files Browse the repository at this point in the history
  • Loading branch information
annapendleton committed Mar 27, 2024
1 parent 16ca73b commit 32826d4
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
8 changes: 8 additions & 0 deletions benchmarks/benchmark/tools/locust-load-inference/build.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ resource "null_resource" "build_and_push_runner_image" {
command = "gcloud builds submit --tag ${var.artifact_registry}/locust-runner:latest locust-runner"
}
}

resource "null_resource" "build_and_push_exporter_image" {

provisioner "local-exec" {
working_dir = path.module
command = "gcloud builds submit --tag ${var.artifact_registry}/locust-custom-exporter:latest locust-custom-exporter"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@
'filter': 'metric.type = "prometheus.googleapis.com/DCGM_FI_DEV_FB_USED/gauge"',
'type': 'GAUGE',
'aggregation': ''
},
'AVG_TEST_TIME': {
'filter': 'metric.type = "prometheus/locust_custom_metrics_avg_test_time/gauge"',
'type': 'GAUGE',
'aggregation': ''
},
'AVG_OUTPUT_TOKEN_LATENCY': {
'filter': 'metric.type = "prometheus/locust_custom_metrics_avg_output_token_latency/gauge"',
'type': 'GAUGE',
'aggregation': ''
},
'AVG_TOKENS_RECEIVED': {
'filter': 'metric.type = "prometheus/locust_custom_metrics_avg_tokens_received/gauge"',
'type': 'GAUGE',
'aggregation': ''
},
'AVG_TOKENS_SENT': {
'filter': 'metric.type = "prometheus/locust_custom_metrics_avg_tokens_sent/gauge"',
'type': 'GAUGE',
'aggregation': ''
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@ spec:
- name: loc-master-p2
containerPort: 5558
protocol: TCP
- name: locust-custom-metrics-exporter
image: ${artifact_registry}/locust-custom-exporter:latest
ports:
- name: cmetrics-port
containerPort: 8080
protocol: TCP
- name: locust-metrics-exporter
image: containersol/locust_exporter
env:
- name: LOCUST_EXPORTER_WEB_LISTEN_ADDRESS
value: ":8080"
ports:
- name: metrics-port
containerPort: 8080
protocol: TCP
containerPort: 9646
protocol: TCP
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ spec:
selector:
matchLabels:
app: locust-master

endpoints:
- port: 8080
interval: 5s
- port: 9646
interval: 5s

0 comments on commit 32826d4

Please sign in to comment.