From: Michael Tremer Date: Wed, 18 Mar 2026 15:03:17 +0000 (+0000) Subject: graphs: processor: Use NaN-safe addition X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cee01a613b27b8b26fd5a234dcb7c8873a7d2f8;p=telemetry.git graphs: processor: Use NaN-safe addition This is needed so that we can import incomplete data from collectd where guest and guest_nice don't exist. We will just treat those values as zero. Signed-off-by: Michael Tremer --- diff --git a/src/daemon/graphs/processor.c b/src/daemon/graphs/processor.c index 74f9079..8eb0d91 100644 --- a/src/daemon/graphs/processor.c +++ b/src/daemon/graphs/processor.c @@ -40,7 +40,8 @@ static int processor_render(td_ctx* ctx, td_graph* graph, // Add up all used cycles r = td_args_push(args, - "CDEF:usage=user,nice,+,sys,+,wait,+,irq,+,softirq,+,steal,+,guest,+,guest_nice,+"); + "CDEF:usage=user,nice,ADDNAN,sys,ADDNAN,wait,ADDNAN,irq,ADDNAN," + "softirq,ADDNAN,steal,ADDNAN,guest,ADDNAN,guest_nice,ADDNAN"); if (r < 0) return r;