MCPcopy Create free account
hub / github.com/apache/trafficserver / json_out_stats

Function json_out_stats

plugins/stats_over_http/stats_over_http.cc:534–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532}
533
534static void
535json_out_stats(stats_state *my_state)
536{
537 const char *version;
538 APPEND("{ \"global\": {\n");
539 TSRecordDump((TSRecordType)(TS_RECORDTYPE_PLUGIN | TS_RECORDTYPE_NODE | TS_RECORDTYPE_PROCESS), json_out_stat, my_state);
540 version = TSTrafficServerVersionGet();
541 APPEND_STAT_JSON_NUMERIC("current_time_epoch_ms", "%" PRIu64, ms_since_epoch());
542 APPEND("\"server\": \"");
543 APPEND(version);
544 APPEND("\"\n");
545
546 APPEND(" }\n}\n");
547}
548
549#if HAVE_BROTLI_ENCODE_H
550// Takes an input stats state struct holding the uncompressed

Callers 1

stats_process_writeFunction · 0.85

Calls 3

TSRecordDumpFunction · 0.85
ms_since_epochFunction · 0.85

Tested by

no test coverage detected