scope-profiler 0.5.2__tar.gz → 0.6.0__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 (171) hide show
  1. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/CMakeLists.txt +1 -1
  2. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/MANIFEST.in +1 -0
  3. {scope_profiler-0.5.2/src/scope_profiler.egg-info → scope_profiler-0.6.0}/PKG-INFO +1 -1
  4. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/pyproject.toml +1 -1
  5. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/c/scope_profiler_hdf5.h +16 -32
  6. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/h5reader.py +36 -8
  7. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/h5schema.py +2 -2
  8. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/h5writer.py +386 -50
  9. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/native_trace.py +1 -1
  10. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/profile_config.py +8 -5
  11. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/profile_manager.py +29 -3
  12. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/check_parallel_hdf5.py +1 -1
  13. scope_profiler-0.6.0/src/scope_profiler/tests/fixtures/compatibility/README.md +16 -0
  14. scope_profiler-0.6.0/src/scope_profiler/tests/fixtures/compatibility/hdf5-schema-1.h5.gz.b64 +12 -0
  15. scope_profiler-0.6.0/src/scope_profiler/tests/fixtures/compatibility/hdf5-schema-2.h5.gz.b64 +17 -0
  16. scope_profiler-0.6.0/src/scope_profiler/tests/fixtures/compatibility/hdf5-schema-3.h5.gz.b64 +17 -0
  17. scope_profiler-0.6.0/src/scope_profiler/tests/fixtures/compatibility/json-v1.json +32 -0
  18. scope_profiler-0.6.0/src/scope_profiler/tests/fixtures/compatibility/native-v1.spt.b64 +2 -0
  19. scope_profiler-0.6.0/src/scope_profiler/tests/fixtures/compatibility/native-v2.spt.b64 +2 -0
  20. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_aggregation.py +1 -1
  21. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_app.py +18 -10
  22. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_buffer_growth.py +6 -2
  23. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_c_hdf5_output.py +2 -1
  24. scope_profiler-0.6.0/src/scope_profiler/tests/test_compatibility_fixtures.py +81 -0
  25. scope_profiler-0.6.0/src/scope_profiler/tests/test_documented_formats.py +31 -0
  26. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_mixed_language.py +13 -0
  27. scope_profiler-0.6.0/src/scope_profiler/tests/test_output_size.py +250 -0
  28. scope_profiler-0.6.0/src/scope_profiler/tests/test_overhead_io.py +319 -0
  29. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_perf_events.py +6 -1
  30. scope_profiler-0.6.0/src/scope_profiler/tests/test_set_version.py +135 -0
  31. scope_profiler-0.6.0/src/scope_profiler/tests/test_storage_size.py +294 -0
  32. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_h5_failure_paths.py +54 -5
  33. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_h5writer.py +24 -7
  34. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_native_hdf5_inputs.py +31 -0
  35. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_payload_collection.py +5 -1
  36. {scope_profiler-0.5.2 → scope_profiler-0.6.0/src/scope_profiler.egg-info}/PKG-INFO +1 -1
  37. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler.egg-info/SOURCES.txt +13 -0
  38. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/LICENSE.txt +0 -0
  39. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/README.md +0 -0
  40. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/cmake/scope-profilerConfig.cmake.in +0 -0
  41. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/examples/cmake/CMakeLists.txt +0 -0
  42. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/examples/cmake/main.cpp +0 -0
  43. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/examples/cmake/mpi.cpp +0 -0
  44. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/examples/cmake/native.c +0 -0
  45. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/examples/ex_mpi_numpy_wrappers.py +0 -0
  46. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/examples/ex_mpi_profiling_options.py +0 -0
  47. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/examples/ex_mpi_wrappers.py +0 -0
  48. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/setup.cfg +0 -0
  49. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/__init__.py +0 -0
  50. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/__main__.py +0 -0
  51. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/_assets/__init__.py +0 -0
  52. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/_assets/scope-profiler-plotly-0.2.0.js +0 -0
  53. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/benchmark.py +0 -0
  54. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/c/Makefile +0 -0
  55. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/c/example.c +0 -0
  56. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/c/scope_profiler.c +0 -0
  57. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/c/scope_profiler.h +0 -0
  58. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/c/scope_profiler.hpp +0 -0
  59. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/c/scope_profiler_impl.h +0 -0
  60. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/c/scope_profiler_mpi.hpp +0 -0
  61. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/call_stack.py +0 -0
  62. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/chrome_trace_export.py +0 -0
  63. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/concurrency.py +0 -0
  64. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/diff.py +0 -0
  65. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/fortran/Makefile +0 -0
  66. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/fortran/example.f90 +0 -0
  67. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/fortran/scope_profiler.f90 +0 -0
  68. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/gpu_timing.py +0 -0
  69. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/html_report.py +0 -0
  70. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/inspection.py +0 -0
  71. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/ipython_magics.py +0 -0
  72. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/json_export.py +0 -0
  73. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/likwid_data.py +0 -0
  74. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/line_profile_cli.py +0 -0
  75. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/mcp_server/__init__.py +0 -0
  76. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/mcp_server/__main__.py +0 -0
  77. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/mcp_server/server.py +0 -0
  78. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/mcp_server/tools.py +0 -0
  79. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/memray.py +0 -0
  80. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/metadata.py +0 -0
  81. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/mpi_launch.py +0 -0
  82. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/mpi_region.py +0 -0
  83. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/mpi_wrappers.py +0 -0
  84. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/perf_events.py +0 -0
  85. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/__init__.py +0 -0
  86. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/_utils.py +0 -0
  87. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/callgraph.py +0 -0
  88. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/duration_timeseries.py +0 -0
  89. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/durations.py +0 -0
  90. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/flame.py +0 -0
  91. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/gantt.py +0 -0
  92. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/heatmap.py +0 -0
  93. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/histogram.py +0 -0
  94. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/imbalance.py +0 -0
  95. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/likwid.py +0 -0
  96. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/perf_events.py +0 -0
  97. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/scaling.py +0 -0
  98. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/statistics.py +0 -0
  99. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/plotting_scripts/timeline.py +0 -0
  100. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/post_processing.py +0 -0
  101. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/prof_export.py +0 -0
  102. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/profile_io.py +0 -0
  103. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/py.typed +0 -0
  104. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/pytest_plugin.py +0 -0
  105. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/region.py +0 -0
  106. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/region_profiler.py +0 -0
  107. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/results.py +0 -0
  108. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/speedscope_export.py +0 -0
  109. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/summary.py +0 -0
  110. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/__init__.py +0 -0
  111. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/check_mpi_launch.py +0 -0
  112. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/examples.py +0 -0
  113. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/examples_pylikwid.py +0 -0
  114. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/pylikwid_readme.py +0 -0
  115. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_api_shortcuts.py +0 -0
  116. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_async_profiling.py +0 -0
  117. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_benchmark.py +0 -0
  118. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_c_api.py +0 -0
  119. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_chrome_trace_export.py +0 -0
  120. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_diff.py +0 -0
  121. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_fortran_api.py +0 -0
  122. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_html_report.py +0 -0
  123. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_in_memory_results.py +0 -0
  124. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_inspection.py +0 -0
  125. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_ipython_magics.py +0 -0
  126. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_json_export.py +0 -0
  127. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_label.py +0 -0
  128. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_likwid_data.py +0 -0
  129. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_line_profile_cli.py +0 -0
  130. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_main_cli.py +0 -0
  131. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_mcp_server.py +0 -0
  132. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_mcp_tools.py +0 -0
  133. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_memray.py +0 -0
  134. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_metadata.py +0 -0
  135. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_mpi.py +0 -0
  136. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_multiple_sessions.py +0 -0
  137. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_multiprocessing.py +0 -0
  138. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_overhead.py +0 -0
  139. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_post_processing.py +0 -0
  140. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_prof_export.py +0 -0
  141. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_profile_config_toml.py +0 -0
  142. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_profiling_options.py +0 -0
  143. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_pytest_plugin.py +0 -0
  144. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_readme.py +0 -0
  145. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_region_source.py +0 -0
  146. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_repeated_finalize.py +0 -0
  147. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_results_api.py +0 -0
  148. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_speedscope_export.py +0 -0
  149. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_summary_likwid.py +0 -0
  150. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_threading.py +0 -0
  151. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/test_tui.py +0 -0
  152. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/__init__.py +0 -0
  153. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_call_stack.py +0 -0
  154. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_call_stack_properties.py +0 -0
  155. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_callgraph_plot.py +0 -0
  156. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_concurrency.py +0 -0
  157. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_gpu_timing.py +0 -0
  158. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_h5_roundtrip.py +0 -0
  159. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_lazy_config.py +0 -0
  160. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_likwid_child_env.py +0 -0
  161. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_merge_results.py +0 -0
  162. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_mpi_launch.py +0 -0
  163. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_mpi_wrappers.py +0 -0
  164. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_native_trace_versions.py +0 -0
  165. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_recursive_tracer.py +0 -0
  166. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tests/unit/test_region_variants.py +0 -0
  167. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler/tui.py +0 -0
  168. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler.egg-info/dependency_links.txt +0 -0
  169. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler.egg-info/entry_points.txt +0 -0
  170. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler.egg-info/requires.txt +0 -0
  171. {scope_profiler-0.5.2 → scope_profiler-0.6.0}/src/scope_profiler.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  cmake_minimum_required(VERSION 3.15)
2
2
 
3
- project(scope-profiler VERSION 0.5.2 LANGUAGES C CXX)
3
+ project(scope-profiler VERSION 0.6.0 LANGUAGES C CXX)
4
4
 
5
5
  include(GNUInstallDirs)
6
6
  include(CMakePackageConfigHelpers)
@@ -4,3 +4,4 @@ include examples/ex_mpi_numpy_wrappers.py
4
4
  include examples/ex_mpi_profiling_options.py
5
5
  recursive-include cmake *.cmake.in
6
6
  recursive-include examples/cmake CMakeLists.txt *.c *.cpp
7
+ recursive-include src/scope_profiler/tests/fixtures *.b64 *.json *.md
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scope-profiler
3
- Version: 0.5.2
3
+ Version: 0.6.0
4
4
  Summary: Profile code regions in python, optionally with LIKWID markers.
5
5
  Author: Max
6
6
  License-Expression: MIT
@@ -5,7 +5,7 @@ requires = [ "setuptools", "wheel" ]
5
5
 
6
6
  [project]
7
7
  name = "scope-profiler"
8
- version = "0.5.2"
8
+ version = "0.6.0"
9
9
  description = "Profile code regions in python, optionally with LIKWID markers."
10
10
  readme = "README.md"
11
11
  keywords = [ "python" ]
@@ -28,8 +28,13 @@
28
28
  * /events/ [N] every event of every region, back to back
29
29
  * start_times int64 nanoseconds
30
30
  * end_times int64 nanoseconds
31
- * call_ids int64 always -1: nesting is not recorded
32
- * parent_ids int64 always -1
31
+ *
32
+ * The optional per-call columns of that schema (call_ids, parent_ids,
33
+ * gpu_durations, the thread/task lanes) are *absent*, which is how the reader
34
+ * is told this run did not record them -- it then reconstructs the nesting
35
+ * from the timestamps. Writing them filled with a "missing" value instead
36
+ * would be read as data: every call would share one id and the call graph
37
+ * would collapse to a single node.
33
38
  *
34
39
  * A rank writes its own file, exactly as it writes its own .spt. Merging the
35
40
  * ranks of an MPI run stays a post-processing step
@@ -69,9 +74,9 @@ typedef struct {
69
74
  double m2;
70
75
  } sp_h5_summary;
71
76
 
72
- /* h5writer._NO_EXCLUSIVE_TOTAL / _NO_GPU_DURATION and the "no call id"
73
- * filler a native import writes: the reader treats each as "this writer did
74
- * not record one" rather than as a value. */
77
+ /* h5writer._NO_EXCLUSIVE_TOTAL: an index row whose writer did not compute an
78
+ * exclusive total. Unlike the event columns, this one is a per-row field that
79
+ * has to be present, and the reader does check it for -1. */
75
80
  #define SP_H5_NOT_RECORDED (-1)
76
81
 
77
82
  /* Every handle a write needs, so one cleanup path can close whatever was
@@ -239,17 +244,6 @@ static int sp_h5_write_event_slice(
239
244
  return failed;
240
245
  }
241
246
 
242
- /* Fill `buffer` with `count` copies of `value`, for the columns whose every
243
- * element is the same "not recorded" filler. */
244
- static void sp_h5_fill(int64_t *buffer, hsize_t count, int64_t value)
245
- {
246
- hsize_t i;
247
-
248
- for (i = 0; i < count; ++i) {
249
- buffer[i] = value;
250
- }
251
- }
252
-
253
247
  /* The fixed-size statistics for one region's events, matching
254
248
  * h5writer._timing_summary(). Two passes, because m2 is the sum of squared
255
249
  * deviations from the mean and the mean is not known until the first is
@@ -372,20 +366,15 @@ static int sp_h5_write_profile(
372
366
  uint32_t *uint32_column = NULL;
373
367
  uint64_t *uint64_column = NULL;
374
368
  int64_t *int64_column = NULL;
375
- int64_t *filler = NULL;
376
369
  sp_h5_summary *summaries = NULL;
377
370
  hsize_t rows = (hsize_t)num_regions;
378
371
  hsize_t total_events = 0;
379
- hsize_t longest_region = 0;
380
372
  int64_t start_time_ns = -1;
381
373
  int failed = 0;
382
374
  int i;
383
375
 
384
376
  for (i = 0; i < num_regions; ++i) {
385
377
  total_events += (hsize_t)counts[i];
386
- if ((hsize_t)counts[i] > longest_region) {
387
- longest_region = (hsize_t)counts[i];
388
- }
389
378
  if (counts[i] > 0 && (start_time_ns < 0 || regions[i]->start_times[0] < start_time_ns)) {
390
379
  start_time_ns = regions[i]->start_times[0];
391
380
  }
@@ -398,9 +387,8 @@ static int sp_h5_write_profile(
398
387
  uint64_column = (uint64_t *)malloc((rows > 0 ? (size_t)rows : 1) * sizeof(*uint64_column));
399
388
  int64_column = (int64_t *)malloc((rows > 0 ? (size_t)rows : 1) * sizeof(*int64_column));
400
389
  summaries = (sp_h5_summary *)malloc((rows > 0 ? (size_t)rows : 1) * sizeof(*summaries));
401
- filler = (int64_t *)malloc((longest_region > 0 ? (size_t)longest_region : 1) * sizeof(*filler));
402
390
  if (strings == NULL || uint32_column == NULL || uint64_column == NULL ||
403
- int64_column == NULL || summaries == NULL || filler == NULL) {
391
+ int64_column == NULL || summaries == NULL) {
404
392
  profiler->last_error = SP_ERR_NO_MEMORY;
405
393
  failed = 1;
406
394
  goto cleanup;
@@ -500,13 +488,15 @@ static int sp_h5_write_profile(
500
488
  }
501
489
  failed |= sp_h5_create_event_column(events_group, "start_times", total_events);
502
490
  failed |= sp_h5_create_event_column(events_group, "end_times", total_events);
503
- failed |= sp_h5_create_event_column(events_group, "call_ids", total_events);
504
- failed |= sp_h5_create_event_column(events_group, "parent_ids", total_events);
505
491
  if (failed) {
506
492
  goto cleanup;
507
493
  }
508
494
 
509
- sp_h5_fill(filler, longest_region, SP_H5_NOT_RECORDED);
495
+ /* Only the two columns this API records. Everything else the schema
496
+ * allows per call -- call/parent ids, GPU durations, thread and task
497
+ * lanes -- is left out, which is what tells the reader to derive the
498
+ * nesting from these timestamps instead of trusting ids that were never
499
+ * assigned. */
510
500
  {
511
501
  hsize_t offset = 0;
512
502
 
@@ -517,11 +507,6 @@ static int sp_h5_write_profile(
517
507
  events_group, "start_times", offset, count, regions[i]->start_times);
518
508
  failed |= sp_h5_write_event_slice(
519
509
  events_group, "end_times", offset, count, regions[i]->end_times);
520
- /* Call and parent ids exist so the reader can rebuild the call
521
- * tree; the C API does not track parents, so every event is
522
- * marked unknown, as a native import marks them. */
523
- failed |= sp_h5_write_event_slice(events_group, "call_ids", offset, count, filler);
524
- failed |= sp_h5_write_event_slice(events_group, "parent_ids", offset, count, filler);
525
510
  offset += count;
526
511
  }
527
512
  }
@@ -541,7 +526,6 @@ cleanup:
541
526
  free(uint64_column);
542
527
  free(int64_column);
543
528
  free(summaries);
544
- free(filler);
545
529
  return failed;
546
530
  }
547
531
 
@@ -325,8 +325,17 @@ def _read_columnar_regions(h5file) -> tuple[dict, list[str], dict]:
325
325
  index["exclusive_totals"][()] if "exclusive_totals" in index else None
326
326
  )
327
327
 
328
- start_times = events["start_times"][()]
329
- end_times = events["end_times"][()]
328
+ # Schema 3 stores each run's start gaps and durations rather than absolute
329
+ # timestamps (see h5writer.encode_start_deltas). Both encodings hold the
330
+ # same information; which one a file uses is visible from the column names,
331
+ # so a schema-2 file written by an older version still reads here.
332
+ delta_encoded = "start_deltas" in events
333
+ if delta_encoded:
334
+ start_times = events["start_deltas"][()]
335
+ end_times = events["durations"][()]
336
+ else:
337
+ start_times = events["start_times"][()]
338
+ end_times = events["end_times"][()]
330
339
  _validate_event_index(offsets, counts, start_times.size, file_path=h5file.filename)
331
340
  gpu_column = events["gpu_durations"][()] if "gpu_durations" in events else None
332
341
  call_column = events["call_ids"][()] if "call_ids" in events else None
@@ -344,6 +353,15 @@ def _read_columnar_regions(h5file) -> tuple[dict, list[str], dict]:
344
353
  exclusive_totals.setdefault(name, {})[rank] = int(totals_column[row])
345
354
  offset = int(offsets[row])
346
355
  event_slice = slice(offset, offset + int(counts[row]))
356
+ if delta_encoded:
357
+ # Each (rank, region) row is one encoded run, so it decodes on its
358
+ # own: a cumulative sum for the starts, then the durations added
359
+ # back on to recover the ends.
360
+ row_starts = np.cumsum(start_times[event_slice])
361
+ row_ends = row_starts + end_times[event_slice]
362
+ else:
363
+ row_starts = start_times[event_slice]
364
+ row_ends = end_times[event_slice]
347
365
  gpu_durations = None
348
366
  if gpu_column is not None:
349
367
  candidate = gpu_column[event_slice]
@@ -356,8 +374,8 @@ def _read_columnar_regions(h5file) -> tuple[dict, list[str], dict]:
356
374
  await_times = await_column[event_slice] if await_column is not None else None
357
375
  source_line = int(source_lines[row])
358
376
  per_region[name][rank] = Region(
359
- start_times[event_slice],
360
- end_times[event_slice],
377
+ row_starts,
378
+ row_ends,
361
379
  gpu_durations=gpu_durations,
362
380
  call_ids=call_ids,
363
381
  parent_ids=parent_ids,
@@ -465,7 +483,11 @@ def load_h5(file_path: str | Path, verbose: bool = False) -> dict:
465
483
  for key, value in f["metadata"].attrs.items()
466
484
  }
467
485
 
468
- if schema_version == 2:
486
+ # Schema 2 introduced the shared event columns and schema 3 changed how
487
+ # those columns are encoded, not where they live, so both are read by
488
+ # the same path -- a version check that is not >= silently reads a
489
+ # newer file as the pre-columnar layout and finds no regions at all.
490
+ if schema_version >= 2:
469
491
  reader = (
470
492
  _read_aggregate_regions
471
493
  if f.attrs.get("storage_layout", "columnar") == "aggregate"
@@ -510,7 +532,9 @@ def load_h5(file_path: str | Path, verbose: bool = False) -> dict:
510
532
  rank_group["line_profile"],
511
533
  )
512
534
 
513
- if schema_version == 2 or "regions" not in rank_group:
535
+ # The per-rank region groups only exist in schema 1; from schema 2
536
+ # on the regions came from the shared columns above.
537
+ if schema_version >= 2 or "regions" not in rank_group:
514
538
  continue
515
539
  regions_group = rank_group["regions"]
516
540
 
@@ -608,9 +632,13 @@ def load_h5_summary(
608
632
  with _open_h5(file_path) as h5file:
609
633
  schema_version = read_schema_version(h5file)
610
634
  migrate_schema(h5file, schema_version)
611
- if schema_version != 2:
635
+ # Summary-only reads need the fixed-size rank_region_index, which
636
+ # arrived in schema 2 and is unchanged since. They never touch the
637
+ # event columns, so schema 3's re-encoding of those does not matter
638
+ # here -- but an exact ``!= 2`` would refuse every future schema.
639
+ if schema_version < 2:
612
640
  raise SummaryDataUnavailable(
613
- "summary-only reads require a schema-2 profiling file",
641
+ "summary-only reads require a schema-2 or newer profiling file",
614
642
  )
615
643
  if "metadata" in h5file:
616
644
  metadata = {
@@ -5,7 +5,7 @@ from __future__ import annotations
5
5
  from numbers import Integral
6
6
 
7
7
  SCHEMA_ATTRIBUTE = "scope_profiler_schema"
8
- CURRENT_SCHEMA_VERSION = 2
8
+ CURRENT_SCHEMA_VERSION = 3
9
9
 
10
10
 
11
11
  class HDF5SchemaError(ValueError):
@@ -49,6 +49,6 @@ def migrate_schema(h5file, version: int) -> int:
49
49
  here without spreading version checks through the HDF5 parser. Migration
50
50
  is read-only: the input file is never modified.
51
51
  """
52
- if version in {1, 2}:
52
+ if version in {1, 2, 3}:
53
53
  return version
54
54
  raise HDF5SchemaError(f"No migration registered for schema version {version}")