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

Function initializeMetrics

plugins/prefetch/fetch.cc:174–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174bool
175initializeMetrics(PrefetchMetricInfo metrics[], const PrefetchConfig &config)
176{
177 bool status = true;
178 for (int i = FETCH_ACTIVE; i < FETCHES_MAX_METRICS; i++) {
179 if (-1 == metrics[i].id) {
180 status = createStat(config.getMetricsPrefix(), config.getNameSpace(), nullptr, getPrefetchMetricsNames(i), metrics[i].type,
181 metrics[i].id);
182 } else {
183 PrefetchDebug("metric %s already initialized", getPrefetchMetricsNames(i));
184 }
185 }
186 return status;
187}
188
189bool
190initializeLog(TSTextLogObject &log, const PrefetchConfig &config)

Callers 2

initMethod · 0.85
parseYamlMethod · 0.85

Calls 2

createStatFunction · 0.85
getPrefetchMetricsNamesFunction · 0.85

Tested by

no test coverage detected