extrap 4.2.2__tar.gz → 4.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. {extrap-4.2.2/extrap.egg-info → extrap-4.2.3}/PKG-INFO +1 -1
  2. {extrap-4.2.2 → extrap-4.2.3}/extrap/__init__.py +1 -1
  3. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/measurement.py +2 -0
  4. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/file_reader/cube_file_reader2.py +8 -4
  5. {extrap-4.2.2 → extrap-4.2.3/extrap.egg-info}/PKG-INFO +1 -1
  6. {extrap-4.2.2 → extrap-4.2.3}/tests/test_load_cube_files.py +71 -1
  7. {extrap-4.2.2 → extrap-4.2.3}/AUTHORS.md +0 -0
  8. {extrap-4.2.2 → extrap-4.2.3}/LICENSE +0 -0
  9. {extrap-4.2.2 → extrap-4.2.3}/MANIFEST.in +0 -0
  10. {extrap-4.2.2 → extrap-4.2.3}/README.md +0 -0
  11. {extrap-4.2.2 → extrap-4.2.3}/extrap/__main__.py +0 -0
  12. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/__init__.py +0 -0
  13. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/annotations/__init__.py +0 -0
  14. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/annotations/comment_annotation/__init__.py +0 -0
  15. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/annotations/comment_annotation/comment_base.svg +0 -0
  16. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/callpath.py +0 -0
  17. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/calltree.py +0 -0
  18. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/coordinate.py +0 -0
  19. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/experiment.py +0 -0
  20. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/fraction.py +0 -0
  21. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/functions.py +0 -0
  22. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/hypotheses.py +0 -0
  23. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/metric.py +0 -0
  24. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/model.py +0 -0
  25. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/named_entity.py +0 -0
  26. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/parameter.py +0 -0
  27. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/scaling_type.py +0 -0
  28. {extrap-4.2.2 → extrap-4.2.3}/extrap/entities/terms.py +0 -0
  29. {extrap-4.2.2 → extrap-4.2.3}/extrap/extrap/__init__.py +0 -0
  30. {extrap-4.2.2 → extrap-4.2.3}/extrap/extrap/extrapcmd.py +0 -0
  31. {extrap-4.2.2 → extrap-4.2.3}/extrap/extrap/extrapgui.py +0 -0
  32. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/__init__.py +0 -0
  33. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/experiment_io.py +0 -0
  34. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/file_reader/__init__.py +0 -0
  35. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/file_reader/abstract_directory_reader.py +0 -0
  36. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/file_reader/extrap3_experiment_reader.py +0 -0
  37. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/file_reader/file_reader_mixin.py +0 -0
  38. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/file_reader/json_file_reader.py +0 -0
  39. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/file_reader/jsonlines_file_reader.py +0 -0
  40. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/file_reader/talpas_file_reader.py +0 -0
  41. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/file_reader/text_file_reader.py +0 -0
  42. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/io_helper.py +0 -0
  43. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/output.py +0 -0
  44. {extrap-4.2.2 → extrap-4.2.3}/extrap/fileio/values_io.py +0 -0
  45. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/AdvancedPlotWidget.py +0 -0
  46. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/ColorWidget.py +0 -0
  47. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/DataDisplay.py +0 -0
  48. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/GraphWidget.py +0 -0
  49. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/ImportOptionsDialog.py +0 -0
  50. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/LogWidget.py +0 -0
  51. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/MainWidget.py +0 -0
  52. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/MeasurementWizardWidget.py +0 -0
  53. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/ModelerOptionsWidget.py +0 -0
  54. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/ModelerWidget.py +0 -0
  55. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/PlotTypeSelector.py +0 -0
  56. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/SelectorWidget.py +0 -0
  57. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/StrongScalingConversionDialog.py +0 -0
  58. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/TreeModel.py +0 -0
  59. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/TreeView.py +0 -0
  60. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/Utils.py +0 -0
  61. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/__init__.py +0 -0
  62. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/components/ExpanderWidget.py +0 -0
  63. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/components/ParameterValueSlider.py +0 -0
  64. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/components/ProgressWindow.py +0 -0
  65. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/components/__init__.py +0 -0
  66. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/components/annotation_delegate.py +0 -0
  67. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/components/dynamic_options.py +0 -0
  68. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/components/file_dialog.py +0 -0
  69. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/components/model_color_map.py +0 -0
  70. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/components/plot_formatting_options.py +0 -0
  71. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/components/switch_widget.py +0 -0
  72. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/components/worker.py +0 -0
  73. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/plots/AbstractPlotWidget.py +0 -0
  74. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/plots/AllFunctionsAsDifferentSurfacePlotWidget.py +0 -0
  75. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/plots/AllFunctionsAsOneSurfacePlotWidget.py +0 -0
  76. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/plots/BaseGraphWidget.py +0 -0
  77. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/plots/DominatingFunctionsAsHeatMapWidget.py +0 -0
  78. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/plots/DominatingFunctionsAsSingleScatterPlotWidget.py +0 -0
  79. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/plots/HeatMapGraphWidget.py +0 -0
  80. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/plots/InterpolatedContourDisplayWidget.py +0 -0
  81. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/plots/IsolinesDisplayWidget.py +0 -0
  82. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/plots/MaxZAsSingleSurfacePlotWidget.py +0 -0
  83. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/plots/MeasurementPointsPlotWidget.py +0 -0
  84. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/plots/__init__.py +0 -0
  85. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/resources/__init__.py +0 -0
  86. {extrap-4.2.2 → extrap-4.2.3}/extrap/gui/resources/menu.svg +0 -0
  87. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/__init__.py +0 -0
  88. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/abstract_modeler.py +0 -0
  89. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/loader.py +0 -0
  90. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/model_generator.py +0 -0
  91. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/modeler_options.py +0 -0
  92. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/multi_parameter/__init__.py +0 -0
  93. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/multi_parameter/multi_parameter_modeler.py +0 -0
  94. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/single_parameter/__init__.py +0 -0
  95. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/single_parameter/abstract_base.py +0 -0
  96. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/single_parameter/adaptive/__init__.py +0 -0
  97. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/single_parameter/basic.py +0 -0
  98. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/single_parameter/refining.py +0 -0
  99. {extrap-4.2.2 → extrap-4.2.3}/extrap/modelers/single_parameter/segmented.py +0 -0
  100. {extrap-4.2.2 → extrap-4.2.3}/extrap/mpa/__init__.py +0 -0
  101. {extrap-4.2.2 → extrap-4.2.3}/extrap/mpa/add_selection_strategy.py +0 -0
  102. {extrap-4.2.2 → extrap-4.2.3}/extrap/mpa/base_selection_strategy.py +0 -0
  103. {extrap-4.2.2 → extrap-4.2.3}/extrap/mpa/gpr_selection_strategy.py +0 -0
  104. {extrap-4.2.2 → extrap-4.2.3}/extrap/mpa/measurement_point_advisor.py +0 -0
  105. {extrap-4.2.2 → extrap-4.2.3}/extrap/mpa/util.py +0 -0
  106. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/__init__.py +0 -0
  107. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/caching.py +0 -0
  108. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/classproperty.py +0 -0
  109. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/deprecation.py +0 -0
  110. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/dynamic_options.py +0 -0
  111. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/exceptions.py +0 -0
  112. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/extension_loader.py +0 -0
  113. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/formatting_helper.py +0 -0
  114. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/latex_formatting.py +0 -0
  115. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/options_parser.py +0 -0
  116. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/progress_bar.py +0 -0
  117. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/serialization_schema.py +0 -0
  118. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/string_formats.py +0 -0
  119. {extrap-4.2.2 → extrap-4.2.3}/extrap/util/unique_list.py +0 -0
  120. {extrap-4.2.2 → extrap-4.2.3}/extrap.egg-info/SOURCES.txt +0 -0
  121. {extrap-4.2.2 → extrap-4.2.3}/extrap.egg-info/dependency_links.txt +0 -0
  122. {extrap-4.2.2 → extrap-4.2.3}/extrap.egg-info/entry_points.txt +0 -0
  123. {extrap-4.2.2 → extrap-4.2.3}/extrap.egg-info/requires.txt +0 -0
  124. {extrap-4.2.2 → extrap-4.2.3}/extrap.egg-info/top_level.txt +0 -0
  125. {extrap-4.2.2 → extrap-4.2.3}/setup.cfg +0 -0
  126. {extrap-4.2.2 → extrap-4.2.3}/setup.py +0 -0
  127. {extrap-4.2.2 → extrap-4.2.3}/tests/test_basic_modeler.py +0 -0
  128. {extrap-4.2.2 → extrap-4.2.3}/tests/test_compat.py +0 -0
  129. {extrap-4.2.2 → extrap-4.2.3}/tests/test_console.py +0 -0
  130. {extrap-4.2.2 → extrap-4.2.3}/tests/test_fraction.py +0 -0
  131. {extrap-4.2.2 → extrap-4.2.3}/tests/test_gui.py +0 -0
  132. {extrap-4.2.2 → extrap-4.2.3}/tests/test_load_extrap3_experiment.py +0 -0
  133. {extrap-4.2.2 → extrap-4.2.3}/tests/test_load_json_file.py +0 -0
  134. {extrap-4.2.2 → extrap-4.2.3}/tests/test_load_jsonlines_file.py +0 -0
  135. {extrap-4.2.2 → extrap-4.2.3}/tests/test_load_save_experiment.py +0 -0
  136. {extrap-4.2.2 → extrap-4.2.3}/tests/test_load_talpas_file.py +0 -0
  137. {extrap-4.2.2 → extrap-4.2.3}/tests/test_load_text_file.py +0 -0
  138. {extrap-4.2.2 → extrap-4.2.3}/tests/test_measurement.py +0 -0
  139. {extrap-4.2.2 → extrap-4.2.3}/tests/test_modeler_adaptive.py +0 -0
  140. {extrap-4.2.2 → extrap-4.2.3}/tests/test_modeling.py +0 -0
  141. {extrap-4.2.2 → extrap-4.2.3}/tests/test_mpa.py +0 -0
  142. {extrap-4.2.2 → extrap-4.2.3}/tests/test_mpa_base_strategy.py +0 -0
  143. {extrap-4.2.2 → extrap-4.2.3}/tests/test_mpa_gpr_strategy.py +0 -0
  144. {extrap-4.2.2 → extrap-4.2.3}/tests/test_mpa_utils.py +0 -0
  145. {extrap-4.2.2 → extrap-4.2.3}/tests/test_multi_param_modeler.py +0 -0
  146. {extrap-4.2.2 → extrap-4.2.3}/tests/test_output.py +0 -0
  147. {extrap-4.2.2 → extrap-4.2.3}/tests/test_refining_modeler.py +0 -0
  148. {extrap-4.2.2 → extrap-4.2.3}/tests/test_scaling_detection.py +0 -0
  149. {extrap-4.2.2 → extrap-4.2.3}/tests/test_segmented_modeler.py +0 -0
  150. {extrap-4.2.2 → extrap-4.2.3}/tests/test_serialization.py +0 -0
  151. {extrap-4.2.2 → extrap-4.2.3}/tests/test_serializing_segments.py +0 -0
  152. {extrap-4.2.2 → extrap-4.2.3}/tests/test_serializing_values.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: extrap
3
- Version: 4.2.2
3
+ Version: 4.2.3
4
4
  Summary: Extra-P, automated performance modeling for HPC applications
5
5
  Home-page: https://github.com/extra-p/extrap
6
6
  Author: Extra-P project
@@ -6,7 +6,7 @@
6
6
  # See the LICENSE file in the base directory for details.
7
7
 
8
8
  __title__ = "Extra-P"
9
- __version__ = "4.2.2"
9
+ __version__ = "4.2.3"
10
10
  __description__ = "Extra-P, automated performance modeling for HPC applications"
11
11
  __copyright__ = "Copyright (c) 2020-2024 Technical University of Darmstadt, Darmstadt, Germany"
12
12
  __documentation_link__ = f"https://github.com/extra-p/extrap/tree/v{__version__}/docs"
@@ -88,6 +88,8 @@ class Measurement:
88
88
  return values
89
89
  if isinstance(values, np.ndarray):
90
90
  return values
91
+ if all(isinstance(v, np.ndarray) for v in values):
92
+ return np.ma.array(values)
91
93
 
92
94
  dim_max_len = [(len(values), len(values))]
93
95
 
@@ -220,8 +220,9 @@ class CubeFileReader2(AbstractDirectoryReader, AbstractScalingConversionReader,
220
220
  total_values[callpaths[r_cnode.id]].append(cnode_values.astype(float))
221
221
  elif self.scaling_type == ScalingType.WEAK_THREADED:
222
222
  values = cnode_values.astype(float)
223
- non_zero_value_mask = values != 0
224
- masked_array = ma.array(values, mask=non_zero_value_mask)
223
+ if values.any():
224
+ zero_value_mask = values == 0
225
+ masked_array = ma.array(values, mask=zero_value_mask)
225
226
  total_values[callpaths[r_cnode.id]].append(masked_array)
226
227
  elif self.scaling_type == ScalingType.STRONG:
227
228
  total_values[callpaths[r_cnode.id]].append(cnode_values.sum().astype(float))
@@ -241,8 +242,11 @@ class CubeFileReader2(AbstractDirectoryReader, AbstractScalingConversionReader,
241
242
  aggregated_values[(callpath, metric)].append(cnode_values.astype(float))
242
243
  elif self.scaling_type == ScalingType.WEAK_THREADED:
243
244
  values = cnode_values.astype(float)
244
- non_zero_value_mask = values != 0
245
- aggregated_values[(callpath, metric)].append(ma.array(values, mask=non_zero_value_mask))
245
+ if not values.any():
246
+ aggregated_values[(callpath, metric)].append(ma.array(values))
247
+ else:
248
+ zero_value_mask = (values == 0)
249
+ aggregated_values[(callpath, metric)].append(ma.array(values, mask=zero_value_mask))
246
250
  # in case of strong scaling calculate the sum over all mpi process values
247
251
  elif self.scaling_type == ScalingType.STRONG:
248
252
  aggregated_values[(callpath, metric)].append(cnode_values.sum().astype(float))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: extrap
3
- Version: 4.2.2
3
+ Version: 4.2.3
4
4
  Summary: Extra-P, automated performance modeling for HPC applications
5
5
  Home-page: https://github.com/extra-p/extrap
6
6
  Author: Extra-P project
@@ -1,6 +1,6 @@
1
1
  # This file is part of the Extra-P software (http://www.scalasca.org/software/extra-p)
2
2
  #
3
- # Copyright (c) 2020-2023, Technical University of Darmstadt, Germany
3
+ # Copyright (c) 2020-2024, Technical University of Darmstadt, Germany
4
4
  #
5
5
  # This software may be modified and distributed under the terms of a BSD-style license.
6
6
  # See the LICENSE file in the base directory for details.
@@ -13,6 +13,7 @@ from extrap.entities.calltree import CallTree, Node
13
13
  from extrap.entities.coordinate import Coordinate
14
14
  from extrap.entities.metric import Metric
15
15
  from extrap.entities.parameter import Parameter
16
+ from extrap.entities.scaling_type import ScalingType
16
17
  from extrap.fileio.file_reader.cube_file_reader2 import CubeFileReader2
17
18
  from extrap.util.exceptions import FileFormatError
18
19
 
@@ -129,6 +130,75 @@ class TestCubeFileLoader(unittest.TestCase):
129
130
  CubeFileReader2().read_cube_file('data/cubeset/multi_parameter', 'weak')
130
131
  self.assertFalse(record)
131
132
 
133
+ def test_weak_threaded_loading(self):
134
+ cfr = CubeFileReader2()
135
+ cfr.scaling_type = ScalingType.WEAK_THREADED
136
+ experiment = cfr.read_experiment('data/cubeset/simple_threaded')
137
+ self.assertListEqual([Parameter('f')], experiment.parameters)
138
+ expected_coordinates = {Coordinate(1), Coordinate(2), Coordinate(3), Coordinate(4), Coordinate(5)}
139
+ self.assertSetEqual(expected_coordinates, set(experiment.coordinates))
140
+ self.assertSetEqual({Callpath('main'), Callpath('main->foo'), Callpath('main->bar'),
141
+ Callpath('main->omp parallel'), Callpath('main->zero')}, set(experiment.callpaths))
142
+ self.assertSetEqual({Metric('visits'), Metric('time')},
143
+ set(experiment.metrics))
144
+
145
+ for measurements in experiment.measurements.values():
146
+ self.assertEqual(len(expected_coordinates), len(measurements))
147
+
148
+ cp = Callpath('main->foo')
149
+ met = Metric('time')
150
+ for measurement in experiment.measurements[cp, met]:
151
+ self.assertEqual(cp, measurement.callpath)
152
+ self.assertEqual(met, measurement.metric)
153
+ expected_value = 4.95 * measurement.coordinate[0]
154
+ self.assertAlmostEqual(expected_value, measurement.mean)
155
+ self.assertAlmostEqual(expected_value, measurement.median)
156
+
157
+ cp = Callpath('main->bar')
158
+ met = Metric('time')
159
+ for measurement in experiment.measurements[cp, met]:
160
+ self.assertEqual(cp, measurement.callpath)
161
+ self.assertEqual(met, measurement.metric)
162
+ expected_value = 4.15 * measurement.coordinate[0]
163
+ self.assertAlmostEqual(expected_value, measurement.mean)
164
+ self.assertAlmostEqual(expected_value, measurement.median)
165
+
166
+ cp = Callpath('main->omp parallel')
167
+ met = Metric('time')
168
+ for measurement in experiment.measurements[cp, met]:
169
+ self.assertEqual(cp, measurement.callpath)
170
+ self.assertEqual(met, measurement.metric)
171
+ expected_value = 3.3 * measurement.coordinate[0]
172
+ self.assertAlmostEqual(expected_value, measurement.mean)
173
+ self.assertAlmostEqual(expected_value, measurement.median)
174
+
175
+ cp = Callpath('main->foo')
176
+ met = Metric('visits')
177
+ for measurement in experiment.measurements[cp, met]:
178
+ self.assertEqual(cp, measurement.callpath)
179
+ self.assertEqual(met, measurement.metric)
180
+ expected_value = 8
181
+ self.assertAlmostEqual(expected_value, measurement.mean)
182
+ self.assertAlmostEqual(expected_value, measurement.median)
183
+
184
+ cp = Callpath('main->omp parallel')
185
+ met = Metric('visits')
186
+ for measurement in experiment.measurements[cp, met]:
187
+ self.assertEqual(cp, measurement.callpath)
188
+ self.assertEqual(met, measurement.metric)
189
+ expected_value = 6 * measurement.coordinate[0]
190
+ self.assertAlmostEqual(expected_value, measurement.mean)
191
+ self.assertAlmostEqual(expected_value, measurement.median)
192
+
193
+ cp = Callpath('main->zero')
194
+ met = Metric('visits')
195
+ for measurement in experiment.measurements[cp, met]:
196
+ self.assertEqual(cp, measurement.callpath)
197
+ self.assertEqual(met, measurement.metric)
198
+ expected_value = 1
199
+ self.assertAlmostEqual(expected_value, measurement.mean)
200
+ self.assertAlmostEqual(expected_value, measurement.median)
201
+
132
202
 
133
203
  if __name__ == '__main__':
134
204
  unittest.main()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes