scope-profiler 0.7.4__tar.gz → 0.8.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 (205) hide show
  1. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/CMakeLists.txt +1 -1
  2. {scope_profiler-0.7.4/src/scope_profiler.egg-info → scope_profiler-0.8.0}/PKG-INFO +9 -11
  3. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/README.md +2 -2
  4. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/pyproject.toml +8 -69
  5. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/__init__.py +22 -6
  6. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/__main__.py +71 -15
  7. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/benchmark.py +30 -2
  8. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/concurrency.py +6 -1
  9. scope_profiler-0.8.0/src/scope_profiler/diff.py +742 -0
  10. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/h5reader.py +4 -1
  11. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/html_report.py +103 -108
  12. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/inspection.py +61 -2
  13. scope_profiler-0.8.0/src/scope_profiler/jobs/__init__.py +66 -0
  14. scope_profiler-0.8.0/src/scope_profiler/jobs/case.py +858 -0
  15. scope_profiler-0.8.0/src/scope_profiler/jobs/cli.py +206 -0
  16. scope_profiler-0.8.0/src/scope_profiler/jobs/clusters.py +208 -0
  17. scope_profiler-0.8.0/src/scope_profiler/jobs/config.py +213 -0
  18. scope_profiler-0.8.0/src/scope_profiler/jobs/schedulers.py +255 -0
  19. scope_profiler-0.8.0/src/scope_profiler/jobs/store.py +149 -0
  20. scope_profiler-0.8.0/src/scope_profiler/jobs/sweep.py +152 -0
  21. scope_profiler-0.8.0/src/scope_profiler/library.py +179 -0
  22. scope_profiler-0.8.0/src/scope_profiler/mcp_server/__init__.py +8 -0
  23. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/mcp_server/server.py +8 -4
  24. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/mcp_server/tools.py +32 -31
  25. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/post_processing.py +3 -1
  26. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/profile_manager.py +325 -99
  27. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/pytest_plugin.py +14 -0
  28. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/region_profiler.py +35 -5
  29. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/report_model.py +3 -1
  30. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/summary.py +74 -1
  31. scope_profiler-0.8.0/src/scope_profiler/tags_cli.py +163 -0
  32. scope_profiler-0.8.0/src/scope_profiler/testing.py +143 -0
  33. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/check_mpi_launch.py +6 -6
  34. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/examples_pylikwid.py +3 -3
  35. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_benchmark.py +20 -0
  36. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_diff.py +176 -1
  37. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_html_report.py +11 -10
  38. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_inspection.py +42 -1
  39. scope_profiler-0.8.0/src/scope_profiler/tests/test_intermediate_timings.py +71 -0
  40. scope_profiler-0.8.0/src/scope_profiler/tests/test_jobs.py +680 -0
  41. scope_profiler-0.8.0/src/scope_profiler/tests/test_library.py +198 -0
  42. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_likwid_data.py +1 -2
  43. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_main_cli.py +12 -4
  44. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_opt_in_tags.py +125 -2
  45. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_overhead.py +3 -3
  46. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_post_processing.py +3 -3
  47. scope_profiler-0.8.0/src/scope_profiler/tests/test_run_session_root.py +25 -0
  48. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_speedscope_export.py +3 -3
  49. scope_profiler-0.8.0/src/scope_profiler/tests/test_suppress_notes.py +41 -0
  50. scope_profiler-0.8.0/src/scope_profiler/tests/test_tags_cli.py +172 -0
  51. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_concurrency.py +14 -0
  52. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_recursive_tracer.py +3 -2
  53. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_region_variants.py +25 -2
  54. {scope_profiler-0.7.4 → scope_profiler-0.8.0/src/scope_profiler.egg-info}/PKG-INFO +9 -11
  55. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler.egg-info/SOURCES.txt +17 -0
  56. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler.egg-info/requires.txt +6 -8
  57. scope_profiler-0.7.4/src/scope_profiler/diff.py +0 -493
  58. scope_profiler-0.7.4/src/scope_profiler/mcp_server/__init__.py +0 -7
  59. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/LICENSE.txt +0 -0
  60. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/MANIFEST.in +0 -0
  61. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/cmake/scope-profilerConfig.cmake.in +0 -0
  62. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/examples/cmake/CMakeLists.txt +0 -0
  63. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/examples/cmake/main.cpp +0 -0
  64. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/examples/cmake/mpi.cpp +0 -0
  65. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/examples/cmake/native.c +0 -0
  66. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/examples/ex_mpi_numpy_wrappers.py +0 -0
  67. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/examples/ex_mpi_profiling_options.py +0 -0
  68. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/examples/ex_mpi_wrappers.py +0 -0
  69. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/setup.cfg +0 -0
  70. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/_assets/__init__.py +0 -0
  71. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/_assets/scope-profiler-plotly-0.2.0.js +0 -0
  72. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/astro_site.py +67 -67
  73. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/c/Makefile +0 -0
  74. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/c/example.c +0 -0
  75. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/c/scope_profiler.c +0 -0
  76. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/c/scope_profiler.h +0 -0
  77. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/c/scope_profiler.hpp +0 -0
  78. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/c/scope_profiler_hdf5.h +0 -0
  79. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/c/scope_profiler_impl.h +0 -0
  80. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/c/scope_profiler_mpi.hpp +0 -0
  81. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/call_stack.py +0 -0
  82. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/catalogue.py +0 -0
  83. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/chrome_trace_export.py +0 -0
  84. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/fortran/Makefile +0 -0
  85. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/fortran/example.f90 +0 -0
  86. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/fortran/scope_profiler.f90 +0 -0
  87. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/gpu_timing.py +0 -0
  88. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/h5schema.py +0 -0
  89. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/h5writer.py +10 -10
  90. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/ipython_magics.py +0 -0
  91. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/json_export.py +0 -0
  92. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/likwid_data.py +0 -0
  93. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/line_profile_cli.py +0 -0
  94. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/mcp_server/__main__.py +0 -0
  95. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/memray.py +0 -0
  96. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/metadata.py +0 -0
  97. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/mpi_launch.py +0 -0
  98. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/mpi_region.py +0 -0
  99. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/mpi_wrappers.py +0 -0
  100. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/native_samples.py +0 -0
  101. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/native_trace.py +0 -0
  102. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/perf_events.py +0 -0
  103. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/__init__.py +0 -0
  104. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/_utils.py +0 -0
  105. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/callgraph.py +0 -0
  106. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/duration_timeseries.py +0 -0
  107. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/durations.py +0 -0
  108. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/flame.py +0 -0
  109. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/gantt.py +0 -0
  110. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/heatmap.py +0 -0
  111. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/histogram.py +0 -0
  112. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/imbalance.py +0 -0
  113. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/likwid.py +0 -0
  114. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/perf_events.py +0 -0
  115. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/roofline.py +0 -0
  116. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/scaling.py +32 -32
  117. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/statistics.py +0 -0
  118. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/plotting_scripts/timeline.py +0 -0
  119. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/prof_export.py +0 -0
  120. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/profile_config.py +0 -0
  121. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/profile_io.py +0 -0
  122. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/py.typed +0 -0
  123. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/region.py +0 -0
  124. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/report_data.py +0 -0
  125. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/results.py +0 -0
  126. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/speedscope_export.py +0 -0
  127. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/__init__.py +0 -0
  128. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/check_parallel_hdf5.py +0 -0
  129. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/conftest.py +0 -0
  130. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/examples.py +0 -0
  131. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/fixtures/compatibility/README.md +0 -0
  132. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/fixtures/compatibility/hdf5-schema-1.h5.gz.b64 +0 -0
  133. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/fixtures/compatibility/hdf5-schema-2.h5.gz.b64 +0 -0
  134. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/fixtures/compatibility/hdf5-schema-3.h5.gz.b64 +0 -0
  135. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/fixtures/compatibility/json-v1.json +0 -0
  136. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/fixtures/compatibility/native-v1.spt.b64 +0 -0
  137. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/fixtures/compatibility/native-v2.spt.b64 +0 -0
  138. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/pylikwid_readme.py +0 -0
  139. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/report_profiles.py +0 -0
  140. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_aggregation.py +0 -0
  141. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_api_shortcuts.py +0 -0
  142. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_app.py +0 -0
  143. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_astro_site.py +5 -5
  144. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_async_profiling.py +0 -0
  145. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_buffer_growth.py +0 -0
  146. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_c_api.py +0 -0
  147. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_c_hdf5_output.py +0 -0
  148. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_chrome_trace_export.py +0 -0
  149. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_compatibility_fixtures.py +0 -0
  150. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_documented_formats.py +0 -0
  151. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_fortran_api.py +0 -0
  152. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_in_memory_results.py +0 -0
  153. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_ipython_magics.py +0 -0
  154. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_json_export.py +0 -0
  155. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_label.py +0 -0
  156. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_line_profile_cli.py +0 -0
  157. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_mcp_server.py +0 -0
  158. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_mcp_tools.py +0 -0
  159. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_memray.py +0 -0
  160. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_metadata.py +0 -0
  161. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_mixed_language.py +0 -0
  162. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_mpi.py +0 -0
  163. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_multiple_sessions.py +0 -0
  164. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_multiprocessing.py +0 -0
  165. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_native_samples.py +0 -0
  166. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_output_size.py +0 -0
  167. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_overhead_io.py +0 -0
  168. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_perf_events.py +0 -0
  169. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_prof_export.py +0 -0
  170. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_profile_config_toml.py +0 -0
  171. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_profiling_options.py +0 -0
  172. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_pytest_plugin.py +0 -0
  173. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_readme.py +0 -0
  174. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_region_source.py +0 -0
  175. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_repeated_finalize.py +0 -0
  176. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_report_model.py +0 -0
  177. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_report_performance.py +0 -0
  178. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_results_api.py +0 -0
  179. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_set_version.py +0 -0
  180. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_storage_size.py +0 -0
  181. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_summary_likwid.py +0 -0
  182. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_threading.py +0 -0
  183. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/test_tui.py +0 -0
  184. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/__init__.py +0 -0
  185. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_call_stack.py +0 -0
  186. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_call_stack_properties.py +0 -0
  187. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_callgraph_plot.py +0 -0
  188. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_gpu_summary.py +0 -0
  189. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_gpu_timing.py +0 -0
  190. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_h5_failure_paths.py +0 -0
  191. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_h5_roundtrip.py +0 -0
  192. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_h5writer.py +0 -0
  193. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_lazy_config.py +0 -0
  194. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_likwid_child_env.py +0 -0
  195. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_merge_results.py +0 -0
  196. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_mpi_launch.py +0 -0
  197. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_mpi_wrappers.py +0 -0
  198. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_native_hdf5_inputs.py +0 -0
  199. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_native_trace_versions.py +0 -0
  200. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_payload_collection.py +0 -0
  201. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tests/unit/test_summary_rendering.py +0 -0
  202. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler/tui.py +0 -0
  203. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler.egg-info/dependency_links.txt +0 -0
  204. {scope_profiler-0.7.4 → scope_profiler-0.8.0}/src/scope_profiler.egg-info/entry_points.txt +0 -0
  205. {scope_profiler-0.7.4 → scope_profiler-0.8.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.7.4 LANGUAGES C CXX)
3
+ project(scope-profiler VERSION 0.8.0 LANGUAGES C CXX)
4
4
 
5
5
  include(GNUInstallDirs)
6
6
  include(CMakePackageConfigHelpers)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scope-profiler
3
- Version: 0.7.4
3
+ Version: 0.8.0
4
4
  Summary: Profile code regions in python, optionally with LIKWID markers.
5
5
  Author: Max
6
6
  License-Expression: MIT
@@ -18,7 +18,7 @@ Description-Content-Type: text/markdown
18
18
  License-File: LICENSE.txt
19
19
  Requires-Dist: h5py
20
20
  Requires-Dist: numpy
21
- Requires-Dist: tabulate
21
+ Requires-Dist: tabulate>=0.10.0
22
22
  Requires-Dist: tomli>=2.0; python_version < "3.11"
23
23
  Provides-Extra: fortran
24
24
  Requires-Dist: meson; extra == "fortran"
@@ -46,23 +46,20 @@ Requires-Dist: flameprof; extra == "pproc"
46
46
  Requires-Dist: ipykernel; extra == "pproc"
47
47
  Requires-Dist: jupyterlab; extra == "pproc"
48
48
  Requires-Dist: matplotlib; extra == "pproc"
49
- Requires-Dist: maxplotlibx==0.1.9; extra == "pproc"
49
+ Requires-Dist: maxplotlibx>=0.1.9; extra == "pproc"
50
50
  Requires-Dist: pandas; extra == "pproc"
51
51
  Requires-Dist: plotly; extra == "pproc"
52
52
  Requires-Dist: pyarrow; extra == "pproc"
53
53
  Requires-Dist: pyvis>=0.3.2; extra == "pproc"
54
54
  Requires-Dist: pyyaml; extra == "pproc"
55
55
  Requires-Dist: snakeviz; extra == "pproc"
56
- Requires-Dist: tabulate; extra == "pproc"
56
+ Requires-Dist: tabulate>=0.10.0; extra == "pproc"
57
57
  Requires-Dist: textual>=0.86; extra == "pproc"
58
58
  Provides-Extra: extras
59
59
  Requires-Dist: memray; extra == "extras"
60
60
  Requires-Dist: scope-profiler[compression,fortran,line-profiler,mcp,mpi,notebook,nvtx,perf-events,pproc,site,tui]; extra == "extras"
61
61
  Provides-Extra: dev
62
- Requires-Dist: black[jupyter]<27,>=26.1; extra == "dev"
63
- Requires-Dist: isort>=9.0.0; extra == "dev"
64
- Requires-Dist: mypy>=1.11.0; extra == "dev"
65
- Requires-Dist: ruff<0.17,>=0.16; extra == "dev"
62
+ Requires-Dist: ruff<0.18,>=0.17; extra == "dev"
66
63
  Requires-Dist: scope-profiler[docs,fortran,line-profiler,mcp,mpi,notebook,nvtx,pproc,test,tui]; extra == "dev"
67
64
  Provides-Extra: docs
68
65
  Requires-Dist: griffe; extra == "docs"
@@ -71,13 +68,14 @@ Requires-Dist: nbclient; extra == "docs"
71
68
  Requires-Dist: nbformat; extra == "docs"
72
69
  Requires-Dist: pre-commit; extra == "docs"
73
70
  Requires-Dist: pyproject-fmt; extra == "docs"
71
+ Requires-Dist: pytest; extra == "docs"
74
72
  Requires-Dist: scope-profiler[line-profiler,mpi,notebook,pproc,site,tui]; extra == "docs"
75
73
  Provides-Extra: test
76
74
  Requires-Dist: coverage[toml]; extra == "test"
77
75
  Requires-Dist: hypothesis; extra == "test"
78
76
  Requires-Dist: pytest; extra == "test"
79
77
  Provides-Extra: tui
80
- Requires-Dist: tabulate; extra == "tui"
78
+ Requires-Dist: tabulate>=0.10.0; extra == "tui"
81
79
  Requires-Dist: textual>=0.86; extra == "tui"
82
80
  Dynamic: license-file
83
81
 
@@ -221,8 +219,8 @@ pip install "scope-profiler[notebook]"
221
219
  and [MCP](https://max-models.github.io/scope-profiler/guide/mcp/)
222
220
  - [Jupyter/IPython
223
221
  magics](https://max-models.github.io/scope-profiler/guide/notebook-magics/)
224
- - [Tutorial
225
- notebooks](https://max-models.github.io/scope-profiler/tutorials/)
222
+ - [Example
223
+ notebooks](https://max-models.github.io/scope-profiler/examples/)
226
224
  - [Examples](https://github.com/max-models/scope-profiler/tree/devel/examples)
227
225
 
228
226
  ### Build the documentation locally
@@ -138,8 +138,8 @@ pip install "scope-profiler[notebook]"
138
138
  and [MCP](https://max-models.github.io/scope-profiler/guide/mcp/)
139
139
  - [Jupyter/IPython
140
140
  magics](https://max-models.github.io/scope-profiler/guide/notebook-magics/)
141
- - [Tutorial
142
- notebooks](https://max-models.github.io/scope-profiler/tutorials/)
141
+ - [Example
142
+ notebooks](https://max-models.github.io/scope-profiler/examples/)
143
143
  - [Examples](https://github.com/max-models/scope-profiler/tree/devel/examples)
144
144
 
145
145
  ### Build the documentation locally
@@ -5,7 +5,7 @@ requires = [ "setuptools", "wheel" ]
5
5
 
6
6
  [project]
7
7
  name = "scope-profiler"
8
- version = "0.7.4"
8
+ version = "0.8.0"
9
9
  description = "Profile code regions in python, optionally with LIKWID markers."
10
10
  readme = "README.md"
11
11
  keywords = [ "python" ]
@@ -25,7 +25,7 @@ classifiers = [
25
25
  dependencies = [
26
26
  "h5py",
27
27
  "numpy",
28
- "tabulate",
28
+ "tabulate>=0.10.0",
29
29
  "tomli>=2.0; python_version < '3.11'",
30
30
  ]
31
31
 
@@ -77,14 +77,14 @@ optional-dependencies.pproc = [
77
77
  "ipykernel",
78
78
  "jupyterlab",
79
79
  "matplotlib",
80
- "maxplotlibx == 0.1.9",
80
+ "maxplotlibx >= 0.1.9",
81
81
  "pandas",
82
82
  "plotly",
83
83
  "pyarrow",
84
84
  "pyvis >= 0.3.2",
85
85
  "pyyaml",
86
86
  "snakeviz",
87
- "tabulate",
87
+ "tabulate>=0.10.0",
88
88
  "textual>=0.86",
89
89
  ]
90
90
 
@@ -96,17 +96,11 @@ optional-dependencies.extras = [
96
96
  ]
97
97
 
98
98
  optional-dependencies.dev = [
99
- # Black is the one code formatter; ruff only lints (`ruff format` is not
100
- # used - the two disagree on a handful of constructs). Pinned to a year
101
- # series: black changes its stable style only in the January release.
102
- "black[jupyter] >= 26.1, < 27",
103
- "isort >= 9.0.0",
104
- "mypy >= 1.11.0",
105
99
  # Pinned to a minor series. Ruff's default rule set grows between minor
106
100
  # releases, so an unpinned dependency turns a routine upgrade into a red
107
101
  # build on a commit nobody touched (0.15 -> 0.16 added ~79 findings here).
108
102
  # Bump deliberately, fixing or triaging the new rules in the same change.
109
- "ruff >= 0.16, < 0.17",
103
+ "ruff >= 0.17, < 0.18",
110
104
  "scope-profiler[docs,fortran,line-profiler,mcp,mpi,notebook,nvtx,pproc,test,tui]",
111
105
  ]
112
106
  # The docs site (docs/, @max-models/starlight-theme): griffe reads the API reference, and
@@ -118,6 +112,7 @@ optional-dependencies.docs = [
118
112
  "nbformat",
119
113
  "pre-commit",
120
114
  "pyproject-fmt",
115
+ "pytest",
121
116
  "scope-profiler[line-profiler,mpi,notebook,pproc,site,tui]",
122
117
  ]
123
118
  optional-dependencies.test = [
@@ -131,7 +126,7 @@ optional-dependencies.test = [
131
126
  ]
132
127
 
133
128
  optional-dependencies.tui = [
134
- "tabulate",
129
+ "tabulate>=0.10.0",
135
130
  "textual>=0.86",
136
131
  ]
137
132
  urls."Source" = "https://github.com/max-models/scope-profiler"
@@ -171,58 +166,6 @@ scope_profiler = [
171
166
  "py.typed",
172
167
  ]
173
168
 
174
- [tool.isort]
175
- profile = "black"
176
-
177
- [tool.black]
178
- # Inferred from requires-python, black also targets not-yet-released Pythons
179
- # and then warns that it cannot verify its output on the running one. The
180
- # oldest supported version is what decides the formatting anyway.
181
- target-version = [ "py310" ]
182
-
183
- [tool.mypy]
184
- # Incremental typing covers the core public result/configuration objects and
185
- # the pure helpers they rest on. Optional integrations and older dynamically
186
- # typed code can be migrated independently without weakening this check.
187
- files = [
188
- "src/scope_profiler/profile_config.py",
189
- "src/scope_profiler/region.py",
190
- "src/scope_profiler/mpi_region.py",
191
- "src/scope_profiler/results.py",
192
- "src/scope_profiler/h5schema.py",
193
- "src/scope_profiler/json_export.py",
194
- "src/scope_profiler/profile_io.py",
195
- "src/scope_profiler/call_stack.py",
196
- "src/scope_profiler/concurrency.py",
197
- "src/scope_profiler/gpu_timing.py",
198
- "src/scope_profiler/metadata.py",
199
- "src/scope_profiler/mpi_launch.py",
200
- ]
201
- # Resolve imports against the source tree rather than whatever happens to be
202
- # installed. Without this, an editable install (a .pth file mypy cannot follow)
203
- # silently degrades every intra-package import to Any locally, while CI's
204
- # regular install - which now carries a py.typed marker - checks them for
205
- # real. That difference hid 131 errors from local runs.
206
- mypy_path = "src"
207
- # Run the checker on the lowest CI-supported modern typing environment. The
208
- # source remains constrained by requires-python >= 3.10.
209
- python_version = "3.12"
210
- check_untyped_defs = true
211
- disallow_untyped_defs = false
212
- ignore_missing_imports = true
213
- no_implicit_optional = true
214
- warn_unused_ignores = true
215
- # Check the modules listed above, not everything they import. Dropping this
216
- # pulls in 21 more modules and ~130 pre-existing errors, which is a migration
217
- # to do module by module (adding each to `files` as it goes green), not a
218
- # config flip.
219
- #
220
- # It also has to stay explicit rather than rely on the default: with a regular
221
- # install (CI) mypy resolves the intra-package imports and follows them, while
222
- # with an editable install (the usual local setup) it cannot, so leaving this
223
- # unset makes local runs pass and CI fail on the very same commit.
224
- follow_imports = "skip"
225
-
226
169
  [tool.coverage.run]
227
170
  # PEP 669 monitoring rather than the C tracer: coverage's default tracer takes
228
171
  # the single sys.settrace slot, which the recursive tracer and the line
@@ -266,7 +209,7 @@ exclude_also = [
266
209
  ]
267
210
 
268
211
  [tool.ruff]
269
- # Linting only: black formats the code. Do not run `ruff format`.
212
+ # formatting: `ruff format`; import sorting: the isort rules of `ruff check`
270
213
  src = [ "src" ]
271
214
 
272
215
  [tool.ruff.lint]
@@ -289,10 +232,6 @@ ignore = [
289
232
  # part of the public contract and asserted by tests (e.g. sample_every);
290
233
  # changing it is an API break, not a lint fix.
291
234
  "TRY004",
292
- # Import sorting belongs to isort, which has its own CI job and its own
293
- # [tool.isort] profile. With both enabled the two disagree on a handful of
294
- # files and each undoes the other's fix on every run.
295
- "I001",
296
235
  ]
297
236
 
298
237
  [tool.ruff.lint.per-file-ignores]
@@ -1,6 +1,5 @@
1
1
  """scope-profiler: lightweight region-based profiling for Python and HPC applications."""
2
2
 
3
- from importlib.metadata import PackageNotFoundError, version
4
3
  from typing import TYPE_CHECKING, Any
5
4
 
6
5
  from scope_profiler.call_stack import (
@@ -18,6 +17,7 @@ from scope_profiler.json_export import (
18
17
  read_json,
19
18
  write_json,
20
19
  )
20
+ from scope_profiler.library import LibraryProfiler, library
21
21
  from scope_profiler.likwid_data import LikwidRegionResult
22
22
  from scope_profiler.mpi_region import MPIRegion
23
23
  from scope_profiler.mpi_wrappers import (
@@ -66,6 +66,7 @@ from scope_profiler.results import ProfilingResults, merge_results
66
66
  #: extra frame there is measurable overhead. They act on the same global
67
67
  #: manager state the class methods do.
68
68
  finalize = ProfileManager.finalize
69
+ current_timings = ProfileManager.current_timings
69
70
  define_region = ProfileManager.define_region
70
71
  is_active = ProfileManager.is_active
71
72
  is_configured = ProfileManager.is_configured
@@ -73,27 +74,27 @@ instrument = ProfileManager.instrument
73
74
  last_results = ProfileManager.last_results
74
75
  metadata = ProfileManager.metadata
75
76
  profile_command = ProfileManager.profile_command
77
+ print_timings = ProfileManager.print_timings
76
78
  profile_script = ProfileManager.profile_script
77
79
  profile = ProfileManager.profile
78
80
  region_factory = ProfileManager.region_factory
79
81
  recorded_regions = ProfileManager.recorded_regions
80
82
  region = ProfileManager.region
81
83
  register_opt_in_tag = ProfileManager.register_opt_in_tag
84
+ opt_in_tags = ProfileManager.opt_in_tags
85
+ reset = ProfileManager.reset
82
86
  registered_regions = ProfileManager.registered_regions
83
87
  session = ProfileManager.session
84
88
  setup = ProfileManager.setup
85
89
  setup_from_env = ProfileManager.setup_from_env
86
90
  run = ProfileManager.run
87
91
 
88
- try:
89
- __version__ = version("scope-profiler")
90
- except PackageNotFoundError:
91
- __version__ = "unknown"
92
-
93
92
  # Keep these imports visible to language servers without importing the optional
94
93
  # plotting/reporting dependencies at runtime. Dynamic module attributes are
95
94
  # otherwise invisible to hover, completion, and static type checkers.
96
95
  if TYPE_CHECKING:
96
+ __version__: str
97
+
97
98
  from scope_profiler.chrome_trace_export import export_chrome_trace
98
99
  from scope_profiler.html_report import create_html_report
99
100
  from scope_profiler.inspection import collect_file_metadata, inspect_file
@@ -130,6 +131,7 @@ __all__ = [
130
131
  "GPUOptions",
131
132
  "HDF5Options",
132
133
  "JSONProfileError",
134
+ "LibraryProfiler",
133
135
  "LikwidRegionResult",
134
136
  "MPIRegion",
135
137
  "MPIRegionMetadata",
@@ -154,6 +156,7 @@ __all__ = [
154
156
  "collect_region_statistics",
155
157
  "collect_roofline_points",
156
158
  "create_html_report",
159
+ "current_timings",
157
160
  "define_region",
158
161
  "export_chrome_trace",
159
162
  "export_flamegraph_svg",
@@ -167,11 +170,13 @@ __all__ = [
167
170
  "is_active",
168
171
  "is_configured",
169
172
  "last_results",
173
+ "library",
170
174
  "load",
171
175
  "load_prof",
172
176
  "merge_results",
173
177
  "message_nbytes",
174
178
  "metadata",
179
+ "opt_in_tags",
175
180
  "parse_mpi_region",
176
181
  "plot_duration_timeseries",
177
182
  "plot_durations",
@@ -186,6 +191,7 @@ __all__ = [
186
191
  "plot_speedup",
187
192
  "plot_weak_scaling",
188
193
  "plot_weak_scaling_efficiency",
194
+ "print_timings",
189
195
  "profile",
190
196
  "profile_command",
191
197
  "profile_mpi4py",
@@ -200,6 +206,7 @@ __all__ = [
200
206
  "region_factory",
201
207
  "register_opt_in_tag",
202
208
  "registered_regions",
209
+ "reset",
203
210
  "run",
204
211
  "session",
205
212
  "setup",
@@ -214,6 +221,15 @@ __all__ = [
214
221
 
215
222
  def __getattr__(name: str) -> Any:
216
223
  """Load optional top-level helpers only when they are first used."""
224
+ if name == "__version__":
225
+ # Looked up on first use: importlib.metadata is about half the cost of
226
+ # ``import scope_profiler`` on top of NumPy.
227
+ from importlib.metadata import PackageNotFoundError, version
228
+
229
+ try:
230
+ return version("scope-profiler")
231
+ except PackageNotFoundError:
232
+ return "unknown"
217
233
  if name in {
218
234
  "collect_region_statistics",
219
235
  "collect_roofline_points",
@@ -41,12 +41,21 @@ The subcommands:
41
41
  merged HDF5 profiling files, region by region, so a regression (or
42
42
  improvement) between two runs shows up in one table. See
43
43
  ``scope_profiler.diff``.
44
+ - ``scope-profiler tags`` - lists the opt-in region tags of the installed
45
+ packages (found through the ``scope_profiler.opt_in_tags`` entry points, or
46
+ ``--import MODULE``) and the regions behind each, i.e. what
47
+ ``--enable-tag`` can switch on. See ``scope_profiler.tags_cli``.
44
48
  - ``scope-profiler check a.h5 b.h5`` - applies a regression budget and
45
49
  returns a CI-friendly exit code.
46
50
  - ``scope-profiler benchmark run config.toml`` - runs a repeatable benchmark
47
51
  with a correctness gate and writes a JSON manifest.
48
52
  - ``scope-profiler benchmark compare baseline.json candidate.json`` - makes a
49
53
  median-based keep/reject decision for an AI agent or CI.
54
+ - ``scope-profiler jobs run case.toml`` - launches a profiling case at
55
+ several rank counts, locally or through SLURM, and packages each run
56
+ (profiles, results, metadata) as it finishes; ``jobs sweep`` runs many
57
+ cases from one process and ``jobs upload`` pushes a packaged case to a git
58
+ results repository. See ``scope_profiler.jobs``.
50
59
  - ``scope-profiler import-native traces/ -o out.h5`` - merges the per-rank
51
60
  files written by the C and Fortran region APIs
52
61
  (``scope_profiler/c/scope_profiler.c``,
@@ -97,6 +106,11 @@ def _parse_run_args(argv):
97
106
  action="store_true",
98
107
  help="Suppress the per-region summary printed after the run",
99
108
  )
109
+ parser.add_argument(
110
+ "--suppress-notes",
111
+ action="store_true",
112
+ help='Leave the "Info" notes box out of the printed summary',
113
+ )
100
114
  recursive = parser.add_mutually_exclusive_group()
101
115
  recursive.add_argument(
102
116
  "--recursive",
@@ -209,7 +223,7 @@ def _parse_run_args(argv):
209
223
  return parser.parse_args(argv)
210
224
 
211
225
 
212
- def _convert_run_output(profile_path, output_path, quiet=False):
226
+ def _convert_run_output(profile_path, output_path, quiet=False, suppress_notes=False):
213
227
  """Render the run's HDF5 output as JSON or HTML, then drop the HDF5.
214
228
 
215
229
  Under MPI only rank 0 holds the merged file, and only rank 0 wrote it, so
@@ -239,7 +253,7 @@ def _convert_run_output(profile_path, output_path, quiet=False):
239
253
  results._file_path = Path(output_path)
240
254
  written = write_profile(results, output_path)
241
255
  if not quiet:
242
- results.print_summary()
256
+ results.print_summary(suppress_notes=suppress_notes)
243
257
  print(f"\nwrote {written}")
244
258
  finally:
245
259
  try:
@@ -258,6 +272,7 @@ def _run(argv):
258
272
  script is done, so nothing about the measured run changes with ``-o``.
259
273
  """
260
274
  from scope_profiler.profile_io import FORMAT_HDF5, profile_format
275
+ from scope_profiler.profile_manager import _ProfilingSession
261
276
 
262
277
  args = _parse_run_args(argv)
263
278
 
@@ -295,28 +310,40 @@ def _run(argv):
295
310
  setup_kwargs["file_path"] = profile_path
296
311
  ProfileManager.setup(**setup_kwargs)
297
312
 
313
+ # Same root interval as ProfileManager.session(), so the summary shows
314
+ # `% session` here too.
315
+ root_region = ProfileManager.profile_region(_ProfilingSession.ROOT_REGION_NAME)
298
316
  try:
299
- ProfileManager.run_script(
300
- args.script,
301
- script_args=args.script_args,
302
- recursive=args.all
303
- or args.entrypoint is not None
304
- or ProfileManager.get_config().recursive_profile,
305
- only_user_code=not args.all,
306
- include_patterns=args.include_patterns,
307
- exclude_patterns=args.exclude_patterns,
308
- entrypoint=args.entrypoint,
309
- )
317
+ with root_region:
318
+ ProfileManager.run_script(
319
+ args.script,
320
+ script_args=args.script_args,
321
+ recursive=args.all
322
+ or args.entrypoint is not None
323
+ or ProfileManager.get_config().recursive_profile,
324
+ only_user_code=not args.all,
325
+ include_patterns=args.include_patterns,
326
+ exclude_patterns=args.exclude_patterns,
327
+ entrypoint=args.entrypoint,
328
+ )
310
329
  finally:
311
330
  # The summary names the file it came from, so with a conversion still
312
331
  # to come it is printed afterwards, against the file the user asked
313
332
  # for, rather than against a temporary that is about to be deleted.
314
- finalize_kwargs = {"verbose": not args.quiet and not convert}
333
+ finalize_kwargs = {
334
+ "verbose": not args.quiet and not convert,
335
+ "suppress_notes": args.suppress_notes,
336
+ }
315
337
  if args.no_output:
316
338
  finalize_kwargs["return_results"] = True
317
339
  ProfileManager.finalize(**finalize_kwargs)
318
340
  if convert:
319
- _convert_run_output(profile_path, args.outfile, quiet=args.quiet)
341
+ _convert_run_output(
342
+ profile_path,
343
+ args.outfile,
344
+ quiet=args.quiet,
345
+ suppress_notes=args.suppress_notes,
346
+ )
320
347
 
321
348
 
322
349
  def _plot(argv):
@@ -575,6 +602,13 @@ def _diff(argv):
575
602
  return diff_main(argv)
576
603
 
577
604
 
605
+ def _tags(argv):
606
+ """Handle ``scope-profiler tags``: list the available opt-in tags."""
607
+ from scope_profiler.tags_cli import main as tags_main
608
+
609
+ return tags_main(argv)
610
+
611
+
578
612
  def _check(argv):
579
613
  """Handle ``scope-profiler check``: enforce a regression budget."""
580
614
  from scope_profiler.diff import check_main
@@ -751,6 +785,13 @@ def _native_lines(argv):
751
785
  return 0
752
786
 
753
787
 
788
+ def _jobs(argv):
789
+ """Handle ``scope-profiler jobs``: launch and package profiling jobs."""
790
+ from scope_profiler.jobs.cli import main as jobs_main
791
+
792
+ return jobs_main(argv)
793
+
794
+
754
795
  _COMMANDS = {
755
796
  "run": _run,
756
797
  "plot": _plot,
@@ -763,9 +804,11 @@ _COMMANDS = {
763
804
  "line-profile": _line_profile,
764
805
  "diff": _diff,
765
806
  "check": _check,
807
+ "tags": _tags,
766
808
  "benchmark": _benchmark,
767
809
  "import-native": _import_fortran,
768
810
  "native-lines": _native_lines,
811
+ "jobs": _jobs,
769
812
  }
770
813
 
771
814
 
@@ -846,6 +889,12 @@ def main(argv=None):
846
889
  add_help=False,
847
890
  help="Fail on profiling regressions (see `scope-profiler check --help`)",
848
891
  )
892
+ subparsers.add_parser(
893
+ "tags",
894
+ add_help=False,
895
+ help="List the opt-in region tags of the installed packages "
896
+ "(see `scope-profiler tags --help`)",
897
+ )
849
898
  subparsers.add_parser(
850
899
  "benchmark",
851
900
  add_help=False,
@@ -864,6 +913,13 @@ def main(argv=None):
864
913
  "(see `scope-profiler native-lines --help`)",
865
914
  )
866
915
 
916
+ subparsers.add_parser(
917
+ "jobs",
918
+ add_help=False,
919
+ help="Launch profiling jobs locally or with SLURM and package the results "
920
+ "(see `scope-profiler jobs --help`)",
921
+ )
922
+
867
923
  if not argv:
868
924
  parser.print_help()
869
925
  raise SystemExit(1)
@@ -208,8 +208,28 @@ def run_benchmark(config: BenchmarkConfig, label: str = "candidate") -> dict:
208
208
  return manifest
209
209
 
210
210
 
211
+ def _noise_seconds(base: dict, cand: dict) -> float | None:
212
+ """Two standard errors of the difference of the mean run times.
213
+
214
+ None unless both manifests hold at least two runs with their spread.
215
+ """
216
+ if base.get("count", 0) < 2 or cand.get("count", 0) < 2:
217
+ return None
218
+ if "stdev" not in base or "stdev" not in cand:
219
+ return None
220
+ return 2 * math.hypot(
221
+ base["stdev"] / math.sqrt(base["count"]),
222
+ cand["stdev"] / math.sqrt(cand["count"]),
223
+ )
224
+
225
+
211
226
  def compare_benchmarks(baseline: dict | str, candidate: dict | str) -> dict:
212
- """Compare benchmark manifests using medians and report an agent decision."""
227
+ """Compare benchmark manifests using medians and report an agent decision.
228
+
229
+ A candidate is kept when it is correct and faster by at least the
230
+ configured threshold; with repeated runs on both sides the change must
231
+ also exceed the run-to-run noise (two standard errors of the difference).
232
+ """
213
233
 
214
234
  def load(value):
215
235
  if isinstance(value, dict):
@@ -223,7 +243,13 @@ def compare_benchmarks(baseline: dict | str, candidate: dict | str) -> dict:
223
243
  ((cand_median - base_median) / base_median * 100) if base_median else None
224
244
  )
225
245
  threshold = float(cand.get("config", {}).get("threshold_pct", 2.0))
226
- faster = bool(cand_median < base_median and change_pct <= -threshold)
246
+ noise = _noise_seconds(base["total_time_seconds"], cand["total_time_seconds"])
247
+ significant = None if noise is None else abs(cand_median - base_median) > noise
248
+ faster = bool(
249
+ cand_median < base_median
250
+ and change_pct <= -threshold
251
+ and significant is not False
252
+ )
227
253
  correctness_passed = bool(cand.get("correctness", {}).get("passed", False))
228
254
  decision = "keep" if faster and correctness_passed else "reject"
229
255
  return {
@@ -231,6 +257,8 @@ def compare_benchmarks(baseline: dict | str, candidate: dict | str) -> dict:
231
257
  "candidate": {"label": cand.get("label"), "stats": cand["total_time_seconds"]},
232
258
  "relative_change_pct": change_pct,
233
259
  "speedup": base_median / cand_median if cand_median else None,
260
+ "noise_seconds": noise,
261
+ "significant": significant,
234
262
  "faster_beyond_threshold": faster,
235
263
  "correctness_passed": correctness_passed,
236
264
  "decision": decision,
@@ -35,7 +35,12 @@ import os
35
35
  import sys
36
36
  import threading
37
37
  import weakref
38
- from time import perf_counter_ns, thread_time_ns
38
+ from time import perf_counter_ns
39
+
40
+ try:
41
+ from time import thread_time_ns
42
+ except ImportError: # Emscripten (Pyodide): no per-thread clock, and only one thread
43
+ from time import process_time_ns as thread_time_ns
39
44
  from typing import Any
40
45
 
41
46
  import numpy as np