Skip to content

Commit f707bb7

Browse files
committed
chore: temporary file level sed of metrics
1 parent 9397f95 commit f707bb7

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

.github/workflows/e2e-tests-linux-split.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,18 @@ jobs:
263263
name: allure-results
264264
path: ./artifacts/reports/allure/results
265265

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+
266278
- name: Upload performance metrics
267279
uses: actions/upload-artifact@v4
268280
with:
@@ -282,20 +294,6 @@ jobs:
282294
- job_name: 'e2e-perf-metrics'
283295
static_configs:
284296
- 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-
299297
remote_write:
300298
- url: "$PUSH_URL"
301299
basic_auth:
@@ -308,7 +306,7 @@ jobs:
308306
- name: Start pushgateway server
309307
run: |
310308
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
312310
#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
313311
printf '\n*****************\n'
314312
echo 'This is my current directory:'
@@ -327,7 +325,7 @@ jobs:
327325
# Uncomment for troubleshooting.
328326
printf '\n*****************\n'
329327
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
331329
#printf '\n*****************\n'
332330
#printf '\n send_failures_total \n'
333331
#curl 'http://localhost:9090/api/v1/query?query=prometheus_remote_storage_queue_send_failures_total'

0 commit comments

Comments
 (0)