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

Function create_stats

plugins/regex_revalidate/regex_revalidate.cc:62–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60static DbgCtl dbg_ctl{PLUGIN_NAME};
61
62static void
63create_stats()
64{
65 if (TS_ERROR == stat_id_stale && TS_ERROR == TSStatFindName(stat_name_stale, &stat_id_stale)) {
66 stat_id_stale = TSStatCreate(stat_name_stale, TS_RECORDDATATYPE_INT, TS_STAT_NON_PERSISTENT, TS_STAT_SYNC_COUNT);
67 if (TS_ERROR != stat_id_stale) {
68 Dbg(dbg_ctl, "Created stat '%s'", stat_name_stale);
69 }
70 }
71
72 if (TS_ERROR == stat_id_miss && TS_ERROR == TSStatFindName(stat_name_miss, &stat_id_miss)) {
73 stat_id_miss = TSStatCreate(stat_name_miss, TS_RECORDDATATYPE_INT, TS_STAT_NON_PERSISTENT, TS_STAT_SYNC_COUNT);
74 if (TS_ERROR != stat_id_miss) {
75 Dbg(dbg_ctl, "Created stat '%s'", stat_name_miss);
76 }
77 }
78}
79
80static void
81increment_stat(TSCacheLookupResult const result)

Callers 1

TSPluginInitFunction · 0.85

Calls 2

TSStatFindNameFunction · 0.85
TSStatCreateFunction · 0.85

Tested by

no test coverage detected