| 60 | static DbgCtl dbg_ctl{PLUGIN_NAME}; |
| 61 | |
| 62 | static void |
| 63 | create_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 | |
| 80 | static void |
| 81 | increment_stat(TSCacheLookupResult const result) |
no test coverage detected