@@ -263,6 +263,18 @@ jobs:
263
263
name : allure-results
264
264
path : ./artifacts/reports/allure/results
265
265
266
+ - name : Push renamed metrics
267
+ working-directory : ' ./artifacts/metrics'
268
+ run : |
269
+ sed -E '
270
+ s/^(e2e_cpu_seconds_total)\{/e2e_cpu_seconds_total_v1\{/;
271
+ s/^(e2e_memory_rss_bytes)\{/e2e_memory_rss_bytes_v1\{/
272
+ ' prometheus.txt > prometheus_renamed.txt
273
+
274
+ printf '\n*****************\n'
275
+ printf '\n curl e2e_cpu_seconds_total \n'
276
+ cat prometheus_renamed.txt
277
+
266
278
- name : Upload performance metrics
267
279
uses : actions/upload-artifact@v4
268
280
with :
@@ -282,20 +294,6 @@ jobs:
282
294
- job_name: 'e2e-perf-metrics'
283
295
static_configs:
284
296
- targets: ['pushgateway:9091']
285
-
286
- metric_relabel_configs:
287
- # rename old_metric → new_metric
288
- - source_labels: [__name__]
289
- regex: '^e2e_cpu_seconds_total$'
290
- target_label: __name__
291
- replacement: e2e_cpu_seconds_total_v1
292
- action: replace
293
- - source_labels: [__name__]
294
- regex: '^e2e_memory_rss_bytes$'
295
- target_label: __name__
296
- replacement: e2e_memory_rss_bytes_v1
297
- action: replace
298
-
299
297
remote_write:
300
298
- url: "$PUSH_URL"
301
299
basic_auth:
@@ -308,7 +306,7 @@ jobs:
308
306
- name : Start pushgateway server
309
307
run : |
310
308
docker run -d --name pushgateway -p 9091:9091 prom/pushgateway
311
- cat ./artifacts/metrics/prometheus .txt | curl --data-binary @- http://localhost:9091/metrics/job/e2e-perf
309
+ cat ./artifacts/metrics/prometheus_renamed .txt | curl --data-binary @- http://localhost:9091/metrics/job/e2e-perf
312
310
#docker run -d --name http-server -v $(pwd):/app -w /app -p 8000:8000 python:3.11-slim python -m http.server 8000 > http.log 2>&1
313
311
printf '\n*****************\n'
314
312
echo 'This is my current directory:'
@@ -327,7 +325,7 @@ jobs:
327
325
# Uncomment for troubleshooting.
328
326
printf '\n*****************\n'
329
327
printf '\n curl e2e_cpu_seconds_total \n'
330
- curl http://localhost:9090/api/v1/query?query=e2e_cpu_seconds_total
328
+ curl http://localhost:9090/api/v1/query?query=e2e_cpu_seconds_total_v1
331
329
#printf '\n*****************\n'
332
330
#printf '\n send_failures_total \n'
333
331
#curl 'http://localhost:9090/api/v1/query?query=prometheus_remote_storage_queue_send_failures_total'
0 commit comments