/** * Add 1 to an existing count for a given event. If the count for that event * does not exist, then it creates one and initializes it to 1. * * This feature is enabled if the system property * "com.amazonaws.sdk.enableRuntimeProfiling" is set, or if a * {@link RequestMetricCollector} is in use either at the request, web service * client, or AWS SDK level. * * @param event * - The name of the event to count */ @Override public void incrementCounter(String event) { timingInfo.incrementCounter(event); }
/** * Add 1 to an existing count for a given event. If the count for that event * does not exist, then it creates one and initializes it to 1. This feature * is enabled if the system property * "com.amazonaws.sdk.enableRuntimeProfiling" is set, or if a * {@link RequestMetricCollector} is in use either at the request, web * service client, or AWS SDK level. * * @param event - The name of the event to count */ @Override public void incrementCounter(String event) { timingInfo.incrementCounter(event); }
/** * Add 1 to an existing count for a given event. If the count for that event * does not exist, then it creates one and initializes it to 1. * * This feature is enabled if the system property * "com.amazonaws.sdk.enableRuntimeProfiling" is set, or if a * {@link RequestMetricCollector} is in use either at the request, web service * client, or AWS SDK level. * * @param event * - The name of the event to count */ @Override public void incrementCounter(String event) { timingInfo.incrementCounter(event); }
/** * Add 1 to an existing count for a given event. If the count for that event * does not exist, then it creates one and initializes it to 1. This feature * is enabled if the system property * "com.amazonaws.sdk.enableRuntimeProfiling" is set, or if a * {@link RequestMetricCollector} is in use either at the request, web * service client, or AWS SDK level. * * @param event - The name of the event to count */ @Override public void incrementCounter(String event) { timingInfo.incrementCounter(event); }
/** * Add 1 to an existing count for a given event. If the count for that event * does not exist, then it creates one and initializes it to 1. This feature * is enabled if the system property * "com.amazonaws.sdk.enableRuntimeProfiling" is set, or if a * {@link RequestMetricCollector} is in use either at the request, web * service client, or AWS SDK level. * * @param event - The name of the event to count */ @Override public void incrementCounter(String event) { timingInfo.incrementCounter(event); }
/** * Add 1 to an existing count for a given event. If the count for that event * does not exist, then it creates one and initializes it to 1. * * This feature is enabled if the system property * "com.amazonaws.sdk.enableRuntimeProfiling" is set, or if a * {@link RequestMetricCollector} is in use either at the request, web service * client, or AWS SDK level. * * @param event * - The name of the event to count */ @Override public void incrementCounter(String event) { timingInfo.incrementCounter(event); }
@Test public void subEventsDisabled() { TimingInfo ti = TimingInfo.startTiming(); ti.addSubMeasurement("m1", TimingInfo.startTiming()); assertNull(ti.getAllSubMeasurements("m1")); ti.incrementCounter("c1"); assertTrue(ti.getAllCounters().size() == 0); ti.setCounter("c2", 0); assertTrue(ti.getAllCounters().size() == 0); }
@Test public void subEventsEnabled() { TimingInfo ti = TimingInfo.startTimingFullSupport(); ti.addSubMeasurement("m1", TimingInfo.startTimingFullSupport()); assertNotNull(ti.getAllSubMeasurements("m1")); ti.incrementCounter("c1"); assertTrue(ti.getAllCounters().size() == 1); ti.setCounter("c2", 0); assertTrue(ti.getAllCounters().size() == 2); }