const char* object, char* vlabel, size_t length) {
return __td_string_set(vlabel, length, _("Queries Per Second"));
}
+
+int td_graph_vlabel_seconds(td_ctx* ctx, td_graph* graph,
+ const char* object, char* vlabel, size_t length) {
+ return __td_string_set(vlabel, length, _("Seconds"));
+}
int td_graph_vlabel_qps(td_ctx* ctx, td_graph* graph,
const char* object, char* vlabel, size_t length);
+int td_graph_vlabel_seconds(td_ctx* ctx, td_graph* graph,
+ const char* object, char* vlabel, size_t length);
+
#endif /* TELEMETRY_GRAPH_H */
#define BPS "%%9.2lf %%s%3s", _("bps")
#define QPS "%%14.2lf %3s", _("qps")
#define HZ "%%10.2lf %%s%2s", _("Hz")
+#define SECONDS_HIGHRES "%%12.2lf%%ss"
+#define SECONDS "%%13.2lfs"
// Macro to terminate a line
#define EOL "\\j"
.lower_limit = 0,
.upper_limit = LONG_MAX,
};
+
+static int unbound_recursion_time_title(td_ctx* ctx, td_graph* graph,
+ const char* object, char* title, size_t length) {
+ return __td_string_set(title, length, _("DNS Recursion Time"));
+}
+
+static int unbound_recursion_time_render(td_ctx* ctx,
+ td_graph* graph, td_args* args, const char* object) {
+ int r;
+
+ // Load all sources
+ r = td_graph_require_source(graph, args, "unbound", NULL);
+ if (r < 0)
+ return r;
+
+ // Header
+ PRINT_HEADER4(args, _("Current"), _("Average"), _("Minimum"), _("Maximum"));
+
+ // Draw the average
+ DRAW_LINE_WITH_LABEL(args, 1, "rec_time_avg", NULL, COLOR_DEFAULT, 0, _("Recursion Time"));
+ PRINT_CAMM(args, "rec_time_avg", NULL, SECONDS_HIGHRES);
+
+ return 0;
+}
+
+const td_graph_impl unbound_recursion_time_graph = {
+ .name = "UnboundRecursionTime",
+ .render = unbound_recursion_time_render,
+ .title = unbound_recursion_time_title,
+ .vlabel = td_graph_vlabel_seconds,
+
+ // Limits
+ .lower_limit = 0,
+ .upper_limit = LONG_MAX,
+};