Home
last modified time | relevance | path

Searched refs:StatsCollectionState (Results 1 – 10 of 10) sorted by relevance

/external/opencensus-java/impl_core/src/test/java/io/opencensus/implcore/stats/
DStatsComponentImplBaseTest.java22 import io.opencensus.stats.StatsCollectionState;
42 assertThat(statsComponent.getState()).isEqualTo(StatsCollectionState.ENABLED); in defaultState()
48 statsComponent.setState(StatsCollectionState.DISABLED); in setState_Disabled()
49 assertThat(statsComponent.getState()).isEqualTo(StatsCollectionState.DISABLED); in setState_Disabled()
55 statsComponent.setState(StatsCollectionState.DISABLED); in setState_Enabled()
56 statsComponent.setState(StatsCollectionState.ENABLED); in setState_Enabled()
57 assertThat(statsComponent.getState()).isEqualTo(StatsCollectionState.ENABLED); in setState_Enabled()
71 statsComponent.setState(StatsCollectionState.DISABLED); in preventSettingStateAfterGettingState()
75 statsComponent.setState(StatsCollectionState.ENABLED); in preventSettingStateAfterGettingState()
DStatsRecorderImplTest.java38 import io.opencensus.stats.StatsCollectionState;
306 statsComponent.setState(StatsCollectionState.DISABLED); in record_StatsDisabled()
327 statsComponent.setState(StatsCollectionState.DISABLED); in record_StatsReenabled()
334 statsComponent.setState(StatsCollectionState.ENABLED); in record_StatsReenabled()
DViewManagerImplTest.java45 import io.opencensus.stats.StatsCollectionState;
882 statsComponent.setState(StatsCollectionState.DISABLED); in registerRecordAndGetView_StatsDisabled()
895 statsComponent.setState(StatsCollectionState.DISABLED); in registerRecordAndGetView_StatsReenabled()
896 statsComponent.setState(StatsCollectionState.ENABLED); in registerRecordAndGetView_StatsReenabled()
913 statsComponent.setState(StatsCollectionState.DISABLED); in registerViewWithStatsDisabled_RecordAndGetViewWithStatsEnabled()
917 statsComponent.setState(StatsCollectionState.ENABLED); in registerViewWithStatsDisabled_RecordAndGetViewWithStatsEnabled()
932 statsComponent.setState(StatsCollectionState.DISABLED); in registerDifferentViewWithSameNameWithStatsDisabled()
990 statsComponent.setState(StatsCollectionState.DISABLED); // This will clear stats. in settingStateToDisabledWillClearStats()
995 statsComponent.setState(StatsCollectionState.ENABLED); in settingStateToDisabledWillClearStats()
/external/opencensus-java/impl_core/src/main/java/io/opencensus/implcore/stats/
DStatsComponentImplBase.java26 import io.opencensus.stats.StatsCollectionState;
67 public StatsCollectionState getState() { in getState()
73 public synchronized void setState(StatsCollectionState newState) { in setState()
77 if (newState == StatsCollectionState.DISABLED) { in setState()
85 private static State statsStateToState(StatsCollectionState statsCollectionState) { in statsStateToState()
86 return statsCollectionState == StatsCollectionState.ENABLED ? State.ENABLED : State.DISABLED; in statsStateToState()
89 private static StatsCollectionState stateToStatsState(State state) { in stateToStatsState()
90 return state == State.ENABLED ? StatsCollectionState.ENABLED : StatsCollectionState.DISABLED; in stateToStatsState()
/external/opencensus-java/api/src/test/java/io/opencensus/stats/
DNoopStatsTest.java66 .isEqualTo(StatsCollectionState.DISABLED); in noopStatsComponent_GetState()
73 noopStatsComponent.setState(StatsCollectionState.ENABLED); in noopStatsComponent_SetState_IgnoresInput()
74 assertThat(noopStatsComponent.getState()).isEqualTo(StatsCollectionState.DISABLED); in noopStatsComponent_SetState_IgnoresInput()
89 noopStatsComponent.setState(StatsCollectionState.DISABLED); in noopStatsComponent_DisallowsSetStateAfterGetState()
93 noopStatsComponent.setState(StatsCollectionState.ENABLED); in noopStatsComponent_DisallowsSetStateAfterGetState()
DStatsTest.java68 assertThat(Stats.getState()).isEqualTo(StatsCollectionState.DISABLED); in getState()
74 Stats.setState(StatsCollectionState.ENABLED); in setState_IgnoresInput()
75 assertThat(Stats.getState()).isEqualTo(StatsCollectionState.DISABLED); in setState_IgnoresInput()
/external/opencensus-java/api/src/main/java/io/opencensus/stats/
DStatsComponent.java54 public abstract StatsCollectionState getState(); in getState()
73 public abstract void setState(StatsCollectionState state); in setState()
DStats.java66 public static StatsCollectionState getState() { in getState()
87 public static void setState(StatsCollectionState state) { in setState()
DNoopStats.java100 public StatsCollectionState getState() { in getState()
102 return StatsCollectionState.DISABLED; in getState()
107 public void setState(StatsCollectionState state) { in setState()
DStatsCollectionState.java24 public enum StatsCollectionState { enum