test_class.file: storm/storm-benchmark/src/test/java/storm/benchmark/util/MetricsUtilsTest.java
test_class.identifier: MetricsUtilsTest
test_case.body: @Test
    public void testGetTopologySummary() {
      ClusterSummary cs = mock(ClusterSummary.class);
      TopologySummary ts = mock(TopologySummary.class);
      String tsName = "benchmarks";
      String fakeName = "fake";
  
      when(cs.get_topologies()).thenReturn(Lists.newArrayList(ts));
      when(ts.get_name()).thenReturn(tsName);
  
      assertThat(MetricsUtils.getTopologySummary(cs, tsName)).isEqualTo(ts);
      assertThat(MetricsUtils.getTopologySummary(cs, fakeName)).isNull();
    }
test_case.class_method_signature: MetricsUtilsTest.testGetTopologySummary()
test_case.full_signature: @Test public void testGetTopologySummary()
test_case.identifier: testGetTopologySummary
test_case.invocations: mock mock thenReturn when get_topologies newArrayList thenReturn when get_name isEqualTo assertThat getTopologySummary isNull assertThat getTopologySummary
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetTopologySummary()
focal_class.declarator: MB = 1000 * 1000
focal_class.modifier: private static final
focal_class.original_string: private static final int MB = 1000 * 1000;
focal_class.type: int
focal_class.var_name: MB
focal_class.file: storm/storm-benchmark/src/main/java/storm/benchmark/util/MetricsUtils.java
focal_class.identifier: MetricsUtils
focal_class.class_method_signature: MetricsUtils.MetricsUtils()
focal_class.full_signature: private  MetricsUtils()
focal_class.identifier: MetricsUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  MetricsUtils()
focal_class.class_method_signature: MetricsUtils.addLatency(Map<String, List<Double>> stats, String id, double lat)
focal_class.full_signature: public static void addLatency(Map<String, List<Double>> stats, String id, double lat)
focal_class.identifier: addLatency
focal_class.modifiers: public static
focal_class.parameters: (Map<String, List<Double>> stats, String id, double lat)
focal_class.return: void
focal_class.signature: void addLatency(Map<String, List<Double>> stats, String id, double lat)
focal_class.class_method_signature: MetricsUtils.getTopologySummary(ClusterSummary cs, String name)
focal_class.full_signature: public static TopologySummary getTopologySummary(ClusterSummary cs, String name)
focal_class.identifier: getTopologySummary
focal_class.modifiers: public static
focal_class.parameters: (ClusterSummary cs, String name)
focal_class.return: TopologySummary
focal_class.signature: TopologySummary getTopologySummary(ClusterSummary cs, String name)
focal_class.class_method_signature: MetricsUtils.getSpoutCompleteLatency(SpoutStats stats, String window, String stream)
focal_class.full_signature: public static double getSpoutCompleteLatency(SpoutStats stats, String window, String stream)
focal_class.identifier: getSpoutCompleteLatency
focal_class.modifiers: public static
focal_class.parameters: (SpoutStats stats, String window, String stream)
focal_class.return: double
focal_class.signature: double getSpoutCompleteLatency(SpoutStats stats, String window, String stream)
focal_class.class_method_signature: MetricsUtils.getSpoutAcked(SpoutStats stats, String window, String stream)
focal_class.full_signature: public static long getSpoutAcked(SpoutStats stats, String window, String stream)
focal_class.identifier: getSpoutAcked
focal_class.modifiers: public static
focal_class.parameters: (SpoutStats stats, String window, String stream)
focal_class.return: long
focal_class.signature: long getSpoutAcked(SpoutStats stats, String window, String stream)
focal_class.class_method_signature: MetricsUtils.getTransferred(ExecutorStats stats, String window, String stream)
focal_class.full_signature: public static long getTransferred(ExecutorStats stats, String window, String stream)
focal_class.identifier: getTransferred
focal_class.modifiers: public static
focal_class.parameters: (ExecutorStats stats, String window, String stream)
focal_class.return: long
focal_class.signature: long getTransferred(ExecutorStats stats, String window, String stream)
focal_class.class_method_signature: MetricsUtils.getThroughput(double throughputDiff, long timeDiff)
focal_class.full_signature: public static double getThroughput(double throughputDiff, long timeDiff)
focal_class.identifier: getThroughput
focal_class.modifiers: public static
focal_class.parameters: (double throughputDiff, long timeDiff)
focal_class.return: double
focal_class.signature: double getThroughput(double throughputDiff, long timeDiff)
focal_class.class_method_signature: MetricsUtils.getThroughputMB(double throughputDiff, long timeDiff, int msgSize)
focal_class.full_signature: public static double getThroughputMB(double throughputDiff, long timeDiff, int msgSize)
focal_class.identifier: getThroughputMB
focal_class.modifiers: public static
focal_class.parameters: (double throughputDiff, long timeDiff, int msgSize)
focal_class.return: double
focal_class.signature: double getThroughputMB(double throughputDiff, long timeDiff, int msgSize)
focal_method.body: public static TopologySummary getTopologySummary(ClusterSummary cs, String name) {
      for (TopologySummary ts : cs.get_topologies()) {
        if (name.equals(ts.get_name())) {
          return ts;
        }
      }
      return null;
    }
focal_method.class_method_signature: MetricsUtils.getTopologySummary(ClusterSummary cs, String name)
focal_method.full_signature: public static TopologySummary getTopologySummary(ClusterSummary cs, String name)
focal_method.identifier: getTopologySummary
focal_method.invocations: get_topologies equals get_name
focal_method.modifiers: public static
focal_method.parameters: (ClusterSummary cs, String name)
focal_method.return: TopologySummary
focal_method.signature: TopologySummary getTopologySummary(ClusterSummary cs, String name)