|
|
@ -331,7 +331,7 @@ class StatsPlugin { |
|
|
|
virtual void RemoveCallback(RegisteredMetricCallback* callback) = 0; |
|
|
|
virtual void RemoveCallback(RegisteredMetricCallback* callback) = 0; |
|
|
|
// Returns true if instrument \a handle is enabled.
|
|
|
|
// Returns true if instrument \a handle is enabled.
|
|
|
|
virtual bool IsInstrumentEnabled( |
|
|
|
virtual bool IsInstrumentEnabled( |
|
|
|
GlobalInstrumentsRegistry::GlobalInstrumentHandle handle) = 0; |
|
|
|
GlobalInstrumentsRegistry::GlobalInstrumentHandle handle) const = 0; |
|
|
|
|
|
|
|
|
|
|
|
// Gets a ClientCallTracer associated with this stats plugin which can be used
|
|
|
|
// Gets a ClientCallTracer associated with this stats plugin which can be used
|
|
|
|
// in a call.
|
|
|
|
// in a call.
|
|
|
@ -430,7 +430,7 @@ class GlobalStatsPluginRegistry { |
|
|
|
// Returns true if any of the stats plugins in the group have enabled \a
|
|
|
|
// Returns true if any of the stats plugins in the group have enabled \a
|
|
|
|
// handle.
|
|
|
|
// handle.
|
|
|
|
bool IsInstrumentEnabled( |
|
|
|
bool IsInstrumentEnabled( |
|
|
|
GlobalInstrumentsRegistry::GlobalInstrumentHandle handle) { |
|
|
|
GlobalInstrumentsRegistry::GlobalInstrumentHandle handle) const { |
|
|
|
for (auto& state : plugins_state_) { |
|
|
|
for (auto& state : plugins_state_) { |
|
|
|
if (state.plugin->IsInstrumentEnabled(handle)) { |
|
|
|
if (state.plugin->IsInstrumentEnabled(handle)) { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|