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

Function RecRawStatSyncSum

src/records/RecRawStats.cc:102–114  ·  view source on GitHub ↗

Note: On these RecRawStatSync callbacks, our 'data' is protected under its lock by the caller, so no need to worry!

Source from the content-addressed store, hash-verified

100// Note: On these RecRawStatSync callbacks, our 'data' is protected
101// under its lock by the caller, so no need to worry!
102int
103RecRawStatSyncSum(const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)
104{
105 RecRawStat total;
106
107 Dbg(dbg_ctl_stats, "raw sync:sum for %s", name);
108 rsb->ops->raw_stat_sync_to_global(rsb, id);
109 total.sum = rsb->global[id]->sum;
110 total.count = rsb->global[id]->count;
111 RecDataSetFromInt64(data_type, data, total.sum);
112
113 return REC_ERR_OKAY;
114}
115
116int
117RecRawStatSyncCount(const char *name, RecDataT data_type, RecData *data, RecRawStatBlock *rsb, int id)

Callers

nothing calls this directly

Calls 2

RecDataSetFromInt64Function · 0.85

Tested by

no test coverage detected