| 532 | } |
| 533 | |
| 534 | static void |
| 535 | json_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 |
no test coverage detected