]> git.ipfire.org Git - collecty.git/commitdiff
legacy-gateway-latency4: Show the average across the graph
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Nov 2025 20:32:44 +0000 (20:32 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Nov 2025 20:32:44 +0000 (20:32 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/graphs/legacy-gateway-latency4.c

index 2ea96847142b4cdf6435559a4f301608e63b233a..f7d66c37b1ae307c094b74d8e85b75dd92cb87de 100644 (file)
@@ -40,6 +40,10 @@ static int legacy_gateway_latency4_render(td_ctx* ctx, td_graph* graph,
        // Header
        PRINT_HEADER4(args, _("Current"), _("Average"), _("Minimum"), _("Maximum"));
 
+       // Draw a horizontal line of the average
+       DRAW_LINE(args, 1, FIELD_AVERAGE("latency"), NULL,
+               COLOR_WITH_ALPHA(COLOR_LATENCY, COLOR_OPACITY_25P), DASHED);
+
        // Draw the stddev area
        DRAW_STDDEV(args, "latency", "stddev", NULL, COLOR_LATENCY);