mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-02-03 20:11:42 +00:00
994be318d4
These scripts hold some learnings on how to compare changes to the metric profile of the exporter. In future we'll teach travis to build this against master automatically and post a comment back to a PR with what's been changed. For now we just want to store them.
17 lines
460 B
Bash
Executable File
17 lines
460 B
Bash
Executable File
#!/bin/bash
|
|
# Script to parse a text exposition format file into a unique list of metrics
|
|
# output by the exporter.
|
|
|
|
# Not currently used for CI, but useful for inspecting the differences of
|
|
# complicated PRs.
|
|
|
|
for raw_prom in $(echo .*.prom) ; do
|
|
# Strip, sort and deduplicate the label names
|
|
cat $raw_prom | grep -v '#' | \
|
|
rev | cut -d' ' -f2- | \
|
|
rev | cut -d'{' -f1 | \
|
|
sort | \
|
|
uniq > ${raw_prom}.unique
|
|
|
|
done
|