probing 0.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 (278) hide show
  1. probing-0.2.3/.cargo/config.toml +8 -0
  2. probing-0.2.3/.github/actions/setup-build-env/action.yml +77 -0
  3. probing-0.2.3/.github/workflows/pypi.yml +125 -0
  4. probing-0.2.3/.github/workflows/test.yml +250 -0
  5. probing-0.2.3/.gitignore +27 -0
  6. probing-0.2.3/.pre-commit-config.yaml +31 -0
  7. probing-0.2.3/.readthedocs.yml +22 -0
  8. probing-0.2.3/Cargo.lock +5094 -0
  9. probing-0.2.3/Cargo.toml +101 -0
  10. probing-0.2.3/LICENSE +202 -0
  11. probing-0.2.3/Makefile +191 -0
  12. probing-0.2.3/PKG-INFO +345 -0
  13. probing-0.2.3/README.cn.md +258 -0
  14. probing-0.2.3/README.md +297 -0
  15. probing-0.2.3/conftest.py +11 -0
  16. probing-0.2.3/docs/.gitignore +28 -0
  17. probing-0.2.3/docs/Makefile +29 -0
  18. probing-0.2.3/docs/README.md +173 -0
  19. probing-0.2.3/docs/README_DEPLOYMENT.md +97 -0
  20. probing-0.2.3/docs/advanced/architecture.md +273 -0
  21. probing-0.2.3/docs/advanced/performance.md +402 -0
  22. probing-0.2.3/docs/build.md +252 -0
  23. probing-0.2.3/docs/build.sh +23 -0
  24. probing-0.2.3/docs/conf.py +80 -0
  25. probing-0.2.3/docs/design/README.md +15 -0
  26. probing-0.2.3/docs/design/architecture.md +14 -0
  27. probing-0.2.3/docs/design/debugging.md +1 -0
  28. probing-0.2.3/docs/design/distributed.md +1 -0
  29. probing-0.2.3/docs/design/extensibility.md +195 -0
  30. probing-0.2.3/docs/design/profiling.md +1 -0
  31. probing-0.2.3/docs/development/building.md +453 -0
  32. probing-0.2.3/docs/getting-started/installation.md +69 -0
  33. probing-0.2.3/docs/getting-started/introduction.md +452 -0
  34. probing-0.2.3/docs/index.rst +51 -0
  35. probing-0.2.3/docs/intro.typ +95 -0
  36. probing-0.2.3/docs/mermaid.min.js +2186 -0
  37. probing-0.2.3/docs/requirements_doc.txt +7 -0
  38. probing-0.2.3/docs/serve.sh +32 -0
  39. probing-0.2.3/docs/src/README.md +54 -0
  40. probing-0.2.3/docs/src/SUMMARY.md +21 -0
  41. probing-0.2.3/docs/src/advanced/architecture.md +259 -0
  42. probing-0.2.3/docs/src/advanced/performance.md +393 -0
  43. probing-0.2.3/docs/src/design/README.md +15 -0
  44. probing-0.2.3/docs/src/design/architecture.md +12 -0
  45. probing-0.2.3/docs/src/design/extensibility.md +195 -0
  46. probing-0.2.3/docs/src/development/building.md +453 -0
  47. probing-0.2.3/docs/src/getting-started/introduction.md +452 -0
  48. probing-0.2.3/docs/src/user-guide/debugging.md +414 -0
  49. probing-0.2.3/docs/src/user-guide/memory-analysis.md +625 -0
  50. probing-0.2.3/docs/src/user-guide/sql-analytics.md +389 -0
  51. probing-0.2.3/docs/user-guide/debugging.md +417 -0
  52. probing-0.2.3/docs/user-guide/memory-analysis.md +625 -0
  53. probing-0.2.3/docs/user-guide/sql-analytics.md +389 -0
  54. probing-0.2.3/docs/user-guide/troubleshooting.md +0 -0
  55. probing-0.2.3/examples/bench_profiler.py +257 -0
  56. probing-0.2.3/examples/child_test_probing.py +110 -0
  57. probing-0.2.3/examples/events.py +137 -0
  58. probing-0.2.3/examples/external_table.py +15 -0
  59. probing-0.2.3/examples/external_table_retirement.py +43 -0
  60. probing-0.2.3/examples/hooks.py +301 -0
  61. probing-0.2.3/examples/imagenet.py +646 -0
  62. probing-0.2.3/examples/imagenet_with_span.py +669 -0
  63. probing-0.2.3/examples/job_tracker.py +94 -0
  64. probing-0.2.3/examples/job_tracker_via_init.py +60 -0
  65. probing-0.2.3/examples/nogil_sleep.pyx +22 -0
  66. probing-0.2.3/examples/ray_tracing_example.py +122 -0
  67. probing-0.2.3/examples/test_probing.py +110 -0
  68. probing-0.2.3/probing/cli/Cargo.toml +51 -0
  69. probing-0.2.3/probing/cli/build.rs +13 -0
  70. probing-0.2.3/probing/cli/src/cli/commands.rs +173 -0
  71. probing-0.2.3/probing/cli/src/cli/ctrl.rs +210 -0
  72. probing-0.2.3/probing/cli/src/cli/inject.rs +438 -0
  73. probing-0.2.3/probing/cli/src/cli/mod.rs +200 -0
  74. probing-0.2.3/probing/cli/src/cli/process_monitor.rs +82 -0
  75. probing-0.2.3/probing/cli/src/cli/ptree.rs +408 -0
  76. probing-0.2.3/probing/cli/src/cli/repl.rs +207 -0
  77. probing-0.2.3/probing/cli/src/cli/store.rs +67 -0
  78. probing-0.2.3/probing/cli/src/inject/README.md +1 -0
  79. probing-0.2.3/probing/cli/src/inject/injection.rs +350 -0
  80. probing-0.2.3/probing/cli/src/inject/injection_aarch64.rs +365 -0
  81. probing-0.2.3/probing/cli/src/inject/injection_trait.rs +85 -0
  82. probing-0.2.3/probing/cli/src/inject/libc_addresses.rs +123 -0
  83. probing-0.2.3/probing/cli/src/inject/mod.rs +252 -0
  84. probing-0.2.3/probing/cli/src/inject/process.rs +180 -0
  85. probing-0.2.3/probing/cli/src/lib.rs +18 -0
  86. probing-0.2.3/probing/cli/src/main.rs +8 -0
  87. probing-0.2.3/probing/cli/src/table.rs +125 -0
  88. probing-0.2.3/probing/cli/tests/test_aarch64.rs +111 -0
  89. probing-0.2.3/probing/core/Cargo.toml +33 -0
  90. probing-0.2.3/probing/core/src/config.rs +257 -0
  91. probing-0.2.3/probing/core/src/core/arrow_convert.rs +43 -0
  92. probing-0.2.3/probing/core/src/core/cluster.rs +71 -0
  93. probing-0.2.3/probing/core/src/core/cluster_model.rs +292 -0
  94. probing-0.2.3/probing/core/src/core/engine.rs +999 -0
  95. probing-0.2.3/probing/core/src/core/error.rs +173 -0
  96. probing-0.2.3/probing/core/src/core/extension.rs +711 -0
  97. probing-0.2.3/probing/core/src/core/mod.rs +97 -0
  98. probing-0.2.3/probing/core/src/core/plugin.rs +335 -0
  99. probing-0.2.3/probing/core/src/lib.rs +32 -0
  100. probing-0.2.3/probing/core/src/storage/addressing.rs +797 -0
  101. probing-0.2.3/probing/core/src/storage/distributed.rs +417 -0
  102. probing-0.2.3/probing/core/src/storage/entity.rs +92 -0
  103. probing-0.2.3/probing/core/src/storage/mem_store.rs +97 -0
  104. probing-0.2.3/probing/core/src/storage/mod.rs +16 -0
  105. probing-0.2.3/probing/core/src/storage/remote_client.rs +69 -0
  106. probing-0.2.3/probing/core/src/storage/topology.rs +435 -0
  107. probing-0.2.3/probing/core/src/trace/mod.rs +12 -0
  108. probing-0.2.3/probing/core/src/trace/span.rs +463 -0
  109. probing-0.2.3/probing/core/src/tracing.rs +836 -0
  110. probing-0.2.3/probing/core/tests/distributed_storage_integration.rs +243 -0
  111. probing-0.2.3/probing/core/tests/engine_complex_tests.rs +289 -0
  112. probing-0.2.3/probing/core/tests/test_helpers.rs +137 -0
  113. probing-0.2.3/probing/crates/store/Cargo.toml +13 -0
  114. probing-0.2.3/probing/crates/store/src/lib.rs +1 -0
  115. probing-0.2.3/probing/crates/store/src/store/mod.rs +3 -0
  116. probing-0.2.3/probing/crates/store/src/store/tcpstore.rs +159 -0
  117. probing-0.2.3/probing/extensions/cc/Cargo.toml +28 -0
  118. probing-0.2.3/probing/extensions/cc/src/extensions/cluster.rs +95 -0
  119. probing-0.2.3/probing/extensions/cc/src/extensions/envs.rs +67 -0
  120. probing-0.2.3/probing/extensions/cc/src/extensions/files.rs +78 -0
  121. probing-0.2.3/probing/extensions/cc/src/extensions/kmsg.rs +94 -0
  122. probing-0.2.3/probing/extensions/cc/src/extensions/mod.rs +23 -0
  123. probing-0.2.3/probing/extensions/cc/src/extensions/rdma.rs +323 -0
  124. probing-0.2.3/probing/extensions/cc/src/extensions/taskstats/datasrc.rs +303 -0
  125. probing-0.2.3/probing/extensions/cc/src/extensions/taskstats.rs +70 -0
  126. probing-0.2.3/probing/extensions/cc/src/lib.rs +1 -0
  127. probing-0.2.3/probing/extensions/python/Cargo.toml +58 -0
  128. probing-0.2.3/probing/extensions/python/build.rs +62 -0
  129. probing-0.2.3/probing/extensions/python/src/extensions/pprof.rs +50 -0
  130. probing-0.2.3/probing/extensions/python/src/extensions/python/exttbls.rs +498 -0
  131. probing-0.2.3/probing/extensions/python/src/extensions/python/stack.rs +34 -0
  132. probing-0.2.3/probing/extensions/python/src/extensions/python/stack_get_threads.py +65 -0
  133. probing-0.2.3/probing/extensions/python/src/extensions/python/tbls.rs +604 -0
  134. probing-0.2.3/probing/extensions/python/src/extensions/python.rs +458 -0
  135. probing-0.2.3/probing/extensions/python/src/extensions/torch.rs +58 -0
  136. probing-0.2.3/probing/extensions/python/src/extensions.rs +7 -0
  137. probing-0.2.3/probing/extensions/python/src/features/config.rs +124 -0
  138. probing-0.2.3/probing/extensions/python/src/features/convert.rs +77 -0
  139. probing-0.2.3/probing/extensions/python/src/features/mod.rs +9 -0
  140. probing-0.2.3/probing/extensions/python/src/features/pprof.rs +68 -0
  141. probing-0.2.3/probing/extensions/python/src/features/python_api.rs +51 -0
  142. probing-0.2.3/probing/extensions/python/src/features/spy/README.md +21 -0
  143. probing-0.2.3/probing/extensions/python/src/features/spy/call.rs +289 -0
  144. probing-0.2.3/probing/extensions/python/src/features/spy/ffi.rs +30 -0
  145. probing-0.2.3/probing/extensions/python/src/features/spy/mod.rs +140 -0
  146. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/mod.rs +338 -0
  147. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/v2_7_15.rs +737 -0
  148. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/v3_10_0.rs +1964 -0
  149. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/v3_11_0.rs +6130 -0
  150. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/v3_12_0.rs +12840 -0
  151. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/v3_13_0.rs +13777 -0
  152. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/v3_3_7.rs +899 -0
  153. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/v3_4_8.rs +890 -0
  154. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/v3_5_5.rs +935 -0
  155. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/v3_6_6.rs +965 -0
  156. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/v3_7_0.rs +1082 -0
  157. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/v3_8_0.rs +1151 -0
  158. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/v3_9_5.rs +1478 -0
  159. probing-0.2.3/probing/extensions/python/src/features/spy/python_bindings/version.rs +196 -0
  160. probing-0.2.3/probing/extensions/python/src/features/spy/python_interpreters.rs +835 -0
  161. probing-0.2.3/probing/extensions/python/src/features/stack_tracer.rs +202 -0
  162. probing-0.2.3/probing/extensions/python/src/features/torch.rs +163 -0
  163. probing-0.2.3/probing/extensions/python/src/features/tracing.rs +508 -0
  164. probing-0.2.3/probing/extensions/python/src/features/vm_tracer.rs +197 -0
  165. probing-0.2.3/probing/extensions/python/src/lib.rs +14 -0
  166. probing-0.2.3/probing/extensions/python/src/pkg/mod.rs +37 -0
  167. probing-0.2.3/probing/extensions/python/src/pycode/crash_handler.py +5 -0
  168. probing-0.2.3/probing/extensions/python/src/pycode/mod.rs +49 -0
  169. probing-0.2.3/probing/extensions/python/src/python.rs +194 -0
  170. probing-0.2.3/probing/extensions/python/src/repl/console.rs +46 -0
  171. probing-0.2.3/probing/extensions/python/src/repl/mod.rs +5 -0
  172. probing-0.2.3/probing/extensions/python/src/repl/python_repl.rs +55 -0
  173. probing-0.2.3/probing/extensions/python/src/setup.rs +26 -0
  174. probing-0.2.3/probing/macros/Cargo.toml +17 -0
  175. probing-0.2.3/probing/macros/src/lib.rs +232 -0
  176. probing-0.2.3/probing/macros/tests/test_macros.rs +136 -0
  177. probing-0.2.3/probing/proto/Cargo.toml +36 -0
  178. probing-0.2.3/probing/proto/benches/bench_series.rs +140 -0
  179. probing-0.2.3/probing/proto/examples/time_series.rs +121 -0
  180. probing-0.2.3/probing/proto/src/lib.rs +27 -0
  181. probing-0.2.3/probing/proto/src/protocol/cluster.rs +101 -0
  182. probing-0.2.3/probing/proto/src/protocol/message.rs +67 -0
  183. probing-0.2.3/probing/proto/src/protocol/mod.rs +5 -0
  184. probing-0.2.3/probing/proto/src/protocol/process.rs +62 -0
  185. probing-0.2.3/probing/proto/src/protocol/query.rs +55 -0
  186. probing-0.2.3/probing/proto/src/protocol/version.rs +34 -0
  187. probing-0.2.3/probing/proto/src/types/basic.rs +312 -0
  188. probing-0.2.3/probing/proto/src/types/compress.rs +159 -0
  189. probing-0.2.3/probing/proto/src/types/convert.rs +215 -0
  190. probing-0.2.3/probing/proto/src/types/dataframe.rs +62 -0
  191. probing-0.2.3/probing/proto/src/types/error.rs +42 -0
  192. probing-0.2.3/probing/proto/src/types/mod.rs +20 -0
  193. probing-0.2.3/probing/proto/src/types/series.rs +735 -0
  194. probing-0.2.3/probing/proto/src/types/time_series.rs +250 -0
  195. probing-0.2.3/probing/proto/tests/basic_tests.rs +54 -0
  196. probing-0.2.3/probing/server/AUTH.md +65 -0
  197. probing-0.2.3/probing/server/Cargo.toml +48 -0
  198. probing-0.2.3/probing/server/MIDDLEWARE.md +137 -0
  199. probing-0.2.3/probing/server/src/asset.rs +64 -0
  200. probing-0.2.3/probing/server/src/auth.rs +190 -0
  201. probing-0.2.3/probing/server/src/engine.rs +112 -0
  202. probing-0.2.3/probing/server/src/extensions.rs +213 -0
  203. probing-0.2.3/probing/server/src/lib.rs +27 -0
  204. probing-0.2.3/probing/server/src/report.rs +84 -0
  205. probing-0.2.3/probing/server/src/server/apis.rs +14 -0
  206. probing-0.2.3/probing/server/src/server/cluster.rs +15 -0
  207. probing-0.2.3/probing/server/src/server/config.rs +27 -0
  208. probing-0.2.3/probing/server/src/server/error.rs +31 -0
  209. probing-0.2.3/probing/server/src/server/extension_handler.rs +131 -0
  210. probing-0.2.3/probing/server/src/server/file_api.rs +124 -0
  211. probing-0.2.3/probing/server/src/server/middleware.rs +121 -0
  212. probing-0.2.3/probing/server/src/server/mod.rs +216 -0
  213. probing-0.2.3/probing/server/src/server/profiling.rs +29 -0
  214. probing-0.2.3/probing/server/src/server/repl.rs +27 -0
  215. probing-0.2.3/probing/server/src/server/system.rs +46 -0
  216. probing-0.2.3/probing/server/src/vars.rs +4 -0
  217. probing-0.2.3/probing/server/tests/auth_complex_tests.rs +78 -0
  218. probing-0.2.3/probing/server/tests/file_api_complex_tests.rs +237 -0
  219. probing-0.2.3/probing.svg +96 -0
  220. probing-0.2.3/pyproject.toml +129 -0
  221. probing-0.2.3/pytest.ini +43 -0
  222. probing-0.2.3/python/probing/__init__.py +62 -0
  223. probing-0.2.3/python/probing/cli/__init__.py +0 -0
  224. probing-0.2.3/python/probing/cli/__main__.py +21 -0
  225. probing-0.2.3/python/probing/config.py +39 -0
  226. probing-0.2.3/python/probing/core/__init__.py +22 -0
  227. probing-0.2.3/python/probing/core/engine.py +119 -0
  228. probing-0.2.3/python/probing/core/table.py +144 -0
  229. probing-0.2.3/python/probing/ext/__init__.py +16 -0
  230. probing-0.2.3/python/probing/ext/example.py +21 -0
  231. probing-0.2.3/python/probing/ext/ray.py +646 -0
  232. probing-0.2.3/python/probing/ext/torch.py +79 -0
  233. probing-0.2.3/python/probing/handlers/__init__.py +29 -0
  234. probing-0.2.3/python/probing/handlers/pythonext.py +578 -0
  235. probing-0.2.3/python/probing/handlers/router.py +448 -0
  236. probing-0.2.3/python/probing/hooks/__init__.py +0 -0
  237. probing-0.2.3/python/probing/hooks/import_hook.py +149 -0
  238. probing-0.2.3/python/probing/inspect/__init__.py +21 -0
  239. probing-0.2.3/python/probing/inspect/torch.py +102 -0
  240. probing-0.2.3/python/probing/inspect/trace.py +1072 -0
  241. probing-0.2.3/python/probing/profiling/__init__.py +15 -0
  242. probing-0.2.3/python/probing/profiling/collective/__init__.py +10 -0
  243. probing-0.2.3/python/probing/profiling/collective/coll.py +344 -0
  244. probing-0.2.3/python/probing/profiling/torch/__init__.py +70 -0
  245. probing-0.2.3/python/probing/profiling/torch/module_utils.py +90 -0
  246. probing-0.2.3/python/probing/profiling/torch/step.py +32 -0
  247. probing-0.2.3/python/probing/profiling/torch_probe.py +584 -0
  248. probing-0.2.3/python/probing/profiling/types.py +62 -0
  249. probing-0.2.3/python/probing/repl/__init__.py +402 -0
  250. probing-0.2.3/python/probing/repl/debug_magic.py +523 -0
  251. probing-0.2.3/python/probing/repl/help_magic.py +323 -0
  252. probing-0.2.3/python/probing/repl/inspect_magic.py +434 -0
  253. probing-0.2.3/python/probing/repl/query_magic.py +147 -0
  254. probing-0.2.3/python/probing/repl/stack_magic.py +69 -0
  255. probing-0.2.3/python/probing/repl/torch_magic.py +454 -0
  256. probing-0.2.3/python/probing/testing/__init__.py +62 -0
  257. probing-0.2.3/python/probing/tracing.py +526 -0
  258. probing-0.2.3/python/probing/utils/__init__.py +0 -0
  259. probing-0.2.3/python/probing/utils/py.py +69 -0
  260. probing-0.2.3/python/probing.pth +1 -0
  261. probing-0.2.3/python/probing_hook.py +125 -0
  262. probing-0.2.3/src/lib.rs +192 -0
  263. probing-0.2.3/tests/__init__.py +0 -0
  264. probing-0.2.3/tests/core/test_config.py +216 -0
  265. probing-0.2.3/tests/core/test_engine.py +23 -0
  266. probing-0.2.3/tests/core/test_init.py +292 -0
  267. probing-0.2.3/tests/ext/__init__.py +0 -0
  268. probing-0.2.3/tests/ext/test_python_ext.py +28 -0
  269. probing-0.2.3/tests/ext/test_python_tracer.py +34 -0
  270. probing-0.2.3/tests/ext/test_tracing_span.py +156 -0
  271. probing-0.2.3/tests/handlers/test_python_handlers.py +250 -0
  272. probing-0.2.3/tests/inspect/test_trace_helpers.py +301 -0
  273. probing-0.2.3/tests/repl/__init__.py +1 -0
  274. probing-0.2.3/tests/repl/test_help_magic.py +60 -0
  275. probing-0.2.3/tests/repl/test_query_magic.py +97 -0
  276. probing-0.2.3/tests/tbls/test_python_tbls.py +42 -0
  277. probing-0.2.3/tests/test_import_hook.py +97 -0
  278. probing-0.2.3/tests/test_py_to_table.rs +79 -0
@@ -0,0 +1,8 @@
1
+ # [target.x86_64-unknown-linux-gnu]
2
+ # rustflags = ["-C", "linker=clang", "-C", "link-arg=-fuse-ld=mold"]
3
+
4
+ # [unstable]
5
+ # codegen-backend = true
6
+
7
+ # [profile.dev]
8
+ # codegen-backend = "cranelift"
@@ -0,0 +1,77 @@
1
+ name: 'Setup Build Environment'
2
+ description: 'Setup Python, Rust, and build tools with caching'
3
+ inputs:
4
+ python-version:
5
+ description: 'Python version to use'
6
+ required: false
7
+ default: '3.12'
8
+ install-cargo-tools:
9
+ description: 'Whether to install cargo tools'
10
+ required: false
11
+ default: 'true'
12
+ install-python-deps:
13
+ description: 'Whether to install Python build dependencies'
14
+ required: false
15
+ default: 'false'
16
+
17
+ runs:
18
+ using: 'composite'
19
+ steps:
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ inputs.python-version }}
24
+
25
+ - name: Install Rust toolchain
26
+ uses: actions-rust-lang/setup-rust-toolchain@v1
27
+ with:
28
+ toolchain: nightly
29
+ components: rustfmt
30
+ rustflags: ""
31
+
32
+ - name: Add Rust Targets
33
+ shell: bash
34
+ run: |
35
+ if [ "${{ runner.os }}" == "Linux" ]; then
36
+ rustup target add wasm32-unknown-unknown x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu
37
+ elif [ "${{ runner.os }}" == "macOS" ]; then
38
+ rustup target add wasm32-unknown-unknown x86_64-apple-darwin aarch64-apple-darwin
39
+ fi
40
+
41
+ - name: Install uv
42
+ uses: astral-sh/setup-uv@v6
43
+ with:
44
+ enable-cache: true
45
+
46
+ - name: Install Zig toolchain
47
+ uses: mlugg/setup-zig@v2
48
+
49
+ - name: Cache dependencies
50
+ id: cache-deps
51
+ uses: actions/cache@v4
52
+ with:
53
+ path: |
54
+ ~/.cargo/bin/
55
+ ~/.cargo/registry/index/
56
+ ~/.cargo/registry/cache/
57
+ ~/.cargo/git/db/
58
+ ~/zig
59
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
60
+
61
+ - name: Install cargo tools
62
+ if: inputs.install-cargo-tools == 'true'
63
+ shell: bash
64
+ run: |
65
+ test -e ~/.cargo/bin/cargo-zigbuild || cargo install cargo-zigbuild
66
+ test -e ~/.cargo/bin/rnr || cargo install rnr
67
+ test -e ~/.cargo/bin/cargo-nextest || cargo install cargo-nextest
68
+ test -e ~/.cargo/bin/cargo-binstall || cargo install cargo-binstall
69
+ test -e ~/.cargo/bin/dx || cargo binstall dioxus-cli -y
70
+ test -e ~/.cargo/bin/trunk || cargo install trunk --locked
71
+
72
+ - name: Install Python Build Dependencies
73
+ if: inputs.install-python-deps == 'true'
74
+ shell: bash
75
+ run: |
76
+ python -m pip install --upgrade pip
77
+ pip install build wheel toml maturin
@@ -0,0 +1,125 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+ # This workflow uses actions that are not certified by GitHub.
5
+ # They are provided by a third-party and are governed by
6
+ # separate terms of service, privacy policy, and support
7
+ # documentation.
8
+
9
+ name: Upload Python Package
10
+
11
+ on:
12
+ release:
13
+ types: [published]
14
+ workflow_dispatch:
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ linux:
21
+ runs-on: ubuntu-latest
22
+ strategy:
23
+ matrix:
24
+ target: [x86_64]
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ - name: Setup Build Environment
28
+ uses: ./.github/actions/setup-build-env
29
+ with:
30
+ python-version: '3.12'
31
+ install-cargo-tools: 'true'
32
+ install-python-deps: 'false'
33
+
34
+ - name: Build frontend
35
+ run: make web/dist
36
+
37
+ - name: Build wheels
38
+ uses: PyO3/maturin-action@v1
39
+ with:
40
+ target: ${{ matrix.target }}
41
+ args: --release --out dist --zig --compatibility manylinux2014 --auditwheel repair
42
+ sccache: 'true'
43
+ manylinux: auto
44
+ rust-toolchain: nightly
45
+
46
+ - name: Upload wheels
47
+ uses: actions/upload-artifact@v4
48
+ with:
49
+ name: wheels-linux-${{ matrix.target }}
50
+ path: dist
51
+
52
+ macos:
53
+ runs-on: macos-latest
54
+ strategy:
55
+ matrix:
56
+ target: [x86_64, aarch64]
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+ - name: Setup Build Environment
60
+ uses: ./.github/actions/setup-build-env
61
+ with:
62
+ python-version: '3.12'
63
+ install-cargo-tools: 'true'
64
+ install-python-deps: 'false'
65
+
66
+ - name: Build frontend
67
+ run: make web/dist
68
+
69
+ - name: Build wheels
70
+ uses: PyO3/maturin-action@v1
71
+ with:
72
+ target: ${{ matrix.target }}
73
+ args: --release --out dist --find-interpreter
74
+ sccache: 'true'
75
+ rust-toolchain: nightly
76
+
77
+ - name: Upload wheels
78
+ uses: actions/upload-artifact@v4
79
+ with:
80
+ name: wheels-macos-${{ matrix.target }}
81
+ path: dist
82
+
83
+ sdist:
84
+ runs-on: ubuntu-latest
85
+ steps:
86
+ - uses: actions/checkout@v4
87
+ - name: Setup Build Environment
88
+ uses: ./.github/actions/setup-build-env
89
+ with:
90
+ install-python-deps: 'false'
91
+ install-cargo-tools: 'true'
92
+
93
+ - name: Build frontend
94
+ run: make web/dist
95
+
96
+ - name: Build sdist
97
+ uses: PyO3/maturin-action@v1
98
+ with:
99
+ command: sdist
100
+ args: --out dist
101
+ rust-toolchain: nightly
102
+
103
+ - name: Upload sdist
104
+ uses: actions/upload-artifact@v4
105
+ with:
106
+ name: wheels-sdist
107
+ path: dist
108
+
109
+ deploy:
110
+ name: Publish to PyPI
111
+ runs-on: ubuntu-latest
112
+ needs: [linux, macos, sdist]
113
+ steps:
114
+ - uses: actions/download-artifact@v4
115
+ with:
116
+ pattern: wheels-*
117
+ merge-multiple: true
118
+ path: dist
119
+
120
+ - name: Publish to PyPI
121
+ uses: pypa/gh-action-pypi-publish@release/v1
122
+ with:
123
+ packages-dir: dist/
124
+ user: __token__
125
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,250 @@
1
+ name: Run Tests
2
+
3
+ on: [pull_request]
4
+
5
+ jobs:
6
+ prepare-linux:
7
+ name: Prepare Environment (Linux)
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v3
11
+ - name: Setup Build Environment
12
+ uses: ./.github/actions/setup-build-env
13
+ with:
14
+ python-version: '3.12'
15
+ install-cargo-tools: 'true'
16
+ install-python-deps: 'true'
17
+
18
+ prepare-macos:
19
+ name: Prepare Environment (macOS)
20
+ runs-on: macos-latest
21
+ steps:
22
+ - uses: actions/checkout@v3
23
+ - name: Setup Build Environment
24
+ uses: ./.github/actions/setup-build-env
25
+ with:
26
+ python-version: '3.12'
27
+ install-cargo-tools: 'true'
28
+ install-python-deps: 'true'
29
+
30
+ build-linux:
31
+ name: Build Package and Run Python Tests (Linux)
32
+ needs: prepare-linux
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+ - name: Setup Build Environment
37
+ uses: ./.github/actions/setup-build-env
38
+ with:
39
+ python-version: '3.12'
40
+ install-cargo-tools: 'true'
41
+ install-python-deps: 'true'
42
+ - name: Code style checking
43
+ run: cargo fmt --all -- --check
44
+ - name: Cache Rust artifacts
45
+ uses: Swatinem/rust-cache@v2
46
+
47
+ - name: Install Python coverage dependencies
48
+ run: |
49
+ pip install pytest pytest-cov coverage
50
+
51
+ - name: Build package
52
+ run: |
53
+ make ZIG=1 wheel
54
+
55
+ - name: Run Python tests and collect coverage
56
+ run: |
57
+ PROBING=1 PYTHONPATH=python/ uv run --python 3.12 -w pytest -w pytest-cov -w coverage -w websockets -w pandas -w torch -w ipykernel -- \
58
+ python -m pytest --cov=python/probing --cov=tests --cov-report=xml:coverage.xml \
59
+ python/probing tests
60
+ env:
61
+ PROBING: "1"
62
+
63
+ - name: Upload artifact
64
+ uses: actions/upload-artifact@v4
65
+ with:
66
+ name: wheel
67
+ path: python
68
+
69
+ - name: Upload Python coverage report
70
+ uses: actions/upload-artifact@v4
71
+ with:
72
+ name: python-coverage
73
+ path: coverage.xml
74
+ retention-days: 30
75
+
76
+ rust-test:
77
+ name: Run Rust Tests
78
+ needs: prepare-linux
79
+ runs-on: ubuntu-latest
80
+ steps:
81
+ - uses: actions/checkout@v4
82
+ - name: Setup Build Environment
83
+ uses: ./.github/actions/setup-build-env
84
+ with:
85
+ python-version: '3.12'
86
+ install-cargo-tools: 'true'
87
+ install-python-deps: 'false'
88
+ - name: Cache Rust artifacts
89
+ uses: Swatinem/rust-cache@v2
90
+
91
+ - name: Build web frontend
92
+ run: |
93
+ # Ensure wasm32 target is available (should already be installed by setup-build-env)
94
+ rustup target add wasm32-unknown-unknown || true
95
+ # Build web frontend (dioxus-cli should already be installed by setup-build-env)
96
+ make web/dist
97
+
98
+ - name: Install llvm-tools-preview component
99
+ run: |
100
+ rustup component add llvm-tools-preview --toolchain nightly
101
+
102
+ - name: Install cargo-llvm-cov
103
+ uses: taiki-e/install-action@cargo-llvm-cov
104
+
105
+ - name: Run Rust tests and collect coverage
106
+ shell: bash
107
+ run: |
108
+ source <(cargo llvm-cov show-env --export-prefix)
109
+ export CARGO_TARGET_DIR=$CARGO_LLVM_COV_TARGET_DIR
110
+ export CARGO_INCREMENTAL=1
111
+ cargo llvm-cov clean --workspace
112
+ cargo nextest run --workspace --no-default-features --nff
113
+ cargo llvm-cov --no-run --lcov --output-path coverage.lcov
114
+
115
+ - name: Upload Rust coverage report
116
+ uses: actions/upload-artifact@v4
117
+ with:
118
+ name: rust-coverage
119
+ path: coverage.lcov
120
+ retention-days: 30
121
+ test:
122
+ name: Run Python Tests (Multi-version)
123
+ needs: [prepare-linux, build-linux]
124
+ runs-on: ubuntu-latest
125
+ strategy:
126
+ fail-fast: false
127
+ matrix:
128
+ python-version:
129
+ - "3.13"
130
+ - "3.12"
131
+ - "3.11"
132
+ - "3.10"
133
+ steps:
134
+ - uses: actions/checkout@v4
135
+ - name: Set up Python
136
+ uses: actions/setup-python@v5
137
+ with:
138
+ python-version: ${{ matrix.python-version }}
139
+ - name: Install uv
140
+ uses: astral-sh/setup-uv@v6
141
+ with:
142
+ enable-cache: true
143
+
144
+ - name: Download wheel
145
+ uses: actions/download-artifact@v4
146
+ with:
147
+ name: wheel
148
+ path: python
149
+
150
+ - name: Install test dependencies
151
+ run: |
152
+ python -m pip install --upgrade pip
153
+ python -m pip install pytest pytest-cov coverage
154
+ python -m pip install websockets pandas torch ipykernel
155
+
156
+ - name: Verify pytest installation
157
+ run: |
158
+ python -m pytest --version
159
+ which python
160
+ python --version
161
+
162
+ - name: Run Python Test
163
+ env:
164
+ PROBING: "1"
165
+ run: make pytest
166
+
167
+ codecov:
168
+ name: Upload Coverage to Codecov
169
+ needs: [build-linux, rust-test]
170
+ runs-on: ubuntu-latest
171
+ if: always()
172
+
173
+ steps:
174
+ - name: Checkout code
175
+ uses: actions/checkout@v4
176
+
177
+ - name: Download Rust coverage report
178
+ uses: actions/download-artifact@v4
179
+ with:
180
+ name: rust-coverage
181
+ path: .
182
+
183
+ - name: Download Python coverage report
184
+ uses: actions/download-artifact@v4
185
+ with:
186
+ name: python-coverage
187
+ path: .
188
+
189
+ - name: Check coverage files exist
190
+ run: |
191
+ if [ -f coverage.lcov ]; then
192
+ echo "✓ coverage.lcov exists ($(wc -l < coverage.lcov) lines)"
193
+ else
194
+ echo "✗ coverage.lcov not found"
195
+ exit 1
196
+ fi
197
+ if [ -f coverage.xml ]; then
198
+ echo "✓ coverage.xml exists ($(wc -l < coverage.xml) lines)"
199
+ else
200
+ echo "✗ coverage.xml not found"
201
+ exit 1
202
+ fi
203
+
204
+ - name: Upload coverage reports to Codecov
205
+ uses: codecov/codecov-action@v4
206
+ with:
207
+ files: coverage.lcov,coverage.xml
208
+ token: ${{ secrets.CODECOV_TOKEN }}
209
+ fail_ci_if_error: false
210
+ verbose: true
211
+
212
+ macos-test:
213
+ name: macOS Tests (Rust + Python)
214
+ needs: prepare-macos
215
+ runs-on: macos-latest
216
+ steps:
217
+ - uses: actions/checkout@v4
218
+ - name: Setup Build Environment
219
+ uses: ./.github/actions/setup-build-env
220
+ with:
221
+ python-version: '3.12'
222
+ install-cargo-tools: 'true'
223
+ install-python-deps: 'true'
224
+
225
+ - name: Install cargo-nextest
226
+ uses: taiki-e/install-action@nextest
227
+
228
+ - name: Build web frontend
229
+ run: |
230
+ rustup target add wasm32-unknown-unknown || true
231
+ make web/dist
232
+
233
+ - name: Run Rust Tests
234
+ run: cargo nextest run --workspace --no-default-features --nff
235
+
236
+ - name: Build and Install Wheel
237
+ run: |
238
+ maturin build --release
239
+ pip install target/wheels/*.whl
240
+
241
+ - name: Install test dependencies
242
+ run: |
243
+ python -m pip install --upgrade pip
244
+ python -m pip install pytest pytest-cov coverage
245
+ python -m pip install websockets pandas torch ipykernel
246
+
247
+ - name: Run Python Tests
248
+ env:
249
+ PROBING: "1"
250
+ run: maturin develop && pytest tests
@@ -0,0 +1,27 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ debug/
4
+ target/
5
+
6
+ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
7
+ # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
8
+ Cargo.lock
9
+
10
+ # These are backup files generated by rustfmt
11
+ **/*.rs.bk
12
+
13
+ # MSVC Windows builds of rustc generate these, which store debugging information
14
+ *.pdb
15
+ probing.egg-info/
16
+ *.so
17
+ *.bak
18
+ .idea/
19
+ app/dist/
20
+ dist/
21
+ .python-version
22
+ report.json
23
+ pkg/
24
+ */scripts/*
25
+ .VSCodeCounter/
26
+ *.pyc
27
+ venv/
@@ -0,0 +1,31 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v4.5.0
6
+ hooks:
7
+ - id: check-yaml
8
+ - id: check-toml
9
+ - id: end-of-file-fixer
10
+ - id: trailing-whitespace
11
+
12
+ - repo: https://github.com/astral-sh/ruff-pre-commit
13
+ rev: v0.1.11
14
+ hooks:
15
+ - id: ruff
16
+ args: [--fix, --exit-non-zero-on-fix]
17
+
18
+ - repo: https://github.com/psf/black
19
+ rev: 24.1.1
20
+ hooks:
21
+ - id: black
22
+
23
+ - repo: local
24
+ hooks:
25
+ - id: cargo-fmt
26
+ name: cargo fmt
27
+ description: Format Rust code
28
+ entry: cargo fmt
29
+ language: system
30
+ types: [rust]
31
+ pass_filenames: false
@@ -0,0 +1,22 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Set the OS, Python version, and other tools you might need
8
+ build:
9
+ os: ubuntu-24.04
10
+ tools:
11
+ python: "3.13"
12
+
13
+ # Build documentation in the "docs/" directory with Sphinx
14
+ sphinx:
15
+ configuration: docs/conf.py
16
+
17
+ # Optionally, but recommended,
18
+ # declare the Python requirements required to build your documentation
19
+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20
+ python:
21
+ install:
22
+ - requirements: docs/requirements_doc.txt