Update to script
This commit is contained in:
@@ -95,7 +95,7 @@ snapshot_to() {
|
|||||||
curl -s http://localhost:9100/metrics > "$1"
|
curl -s http://localhost:9100/metrics > "$1"
|
||||||
}
|
}
|
||||||
get_value() {
|
get_value() {
|
||||||
awk -v pat="$2" '$0 ~ "^" pat " " { print $NF; exit }' "$1"
|
awk -v pat="$2" '$1 == pat { print $NF; exit }' "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir -p "$(dirname "$OUT_CSV")"
|
mkdir -p "$(dirname "$OUT_CSV")"
|
||||||
@@ -141,8 +141,8 @@ for entities in "${ENTITIES_LIST[@]}"; do
|
|||||||
|
|
||||||
sleep "$WARMUP_S"
|
sleep "$WARMUP_S"
|
||||||
snapshot_to "$BEFORE"
|
snapshot_to "$BEFORE"
|
||||||
rec_before=$(get_value "$BEFORE" 'substrate_received_total\{tier="t1"\}')
|
rec_before=$(get_value "$BEFORE" 'substrate_received_total{tier="t1"}')
|
||||||
drop_before=$(get_value "$BEFORE" 'substrate_dropped_total\{tier="t1"\}')
|
drop_before=$(get_value "$BEFORE" 'substrate_dropped_total{tier="t1"}')
|
||||||
|
|
||||||
sleep "$WINDOW_S"
|
sleep "$WINDOW_S"
|
||||||
|
|
||||||
@@ -153,13 +153,13 @@ for entities in "${ENTITIES_LIST[@]}"; do
|
|||||||
SIM_PID=""
|
SIM_PID=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rec_after=$(get_value "$AFTER" 'substrate_received_total\{tier="t1"\}')
|
rec_after=$(get_value "$AFTER" 'substrate_received_total{tier="t1"}')
|
||||||
drop_after=$(get_value "$AFTER" 'substrate_dropped_total\{tier="t1"\}')
|
drop_after=$(get_value "$AFTER" 'substrate_dropped_total{tier="t1"}')
|
||||||
p50=$(get_value "$AFTER" 'substrate_latency_us\{tier="t1",quantile="0.5"\}')
|
p50=$(get_value "$AFTER" 'substrate_latency_us{tier="t1",quantile="0.5"}')
|
||||||
p99=$(get_value "$AFTER" 'substrate_latency_us\{tier="t1",quantile="0.99"\}')
|
p99=$(get_value "$AFTER" 'substrate_latency_us{tier="t1",quantile="0.99"}')
|
||||||
p999=$(get_value "$AFTER" 'substrate_latency_us\{tier="t1",quantile="0.999"\}')
|
p999=$(get_value "$AFTER" 'substrate_latency_us{tier="t1",quantile="0.999"}')
|
||||||
t2_p99=$(get_value "$AFTER" 'substrate_latency_us\{tier="t2",quantile="0.99"\}')
|
t2_p99=$(get_value "$AFTER" 'substrate_latency_us{tier="t2",quantile="0.99"}')
|
||||||
t3_p99=$(get_value "$AFTER" 'substrate_latency_us\{tier="t3",quantile="0.99"\}')
|
t3_p99=$(get_value "$AFTER" 'substrate_latency_us{tier="t3",quantile="0.99"}')
|
||||||
|
|
||||||
tick_hz=$(get_value "$AFTER" 'substrate_tick_hz')
|
tick_hz=$(get_value "$AFTER" 'substrate_tick_hz')
|
||||||
rss=$(get_value "$AFTER" 'substrate_rss_bytes')
|
rss=$(get_value "$AFTER" 'substrate_rss_bytes')
|
||||||
|
|||||||
Reference in New Issue
Block a user