Scalene: a high-performance, high-precision CPU, GPU, and memory profiler for Python with AI-powered optimization proposals
This report presents the forensic synthetic code analysis of plasma-umass/scalene, a Python project with 13,472 GitHub stars. SynthScan v2.0 examined 113,253 lines of code across 448 source files, recording 1013 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 12.6 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1013 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 186 | def fetch_vendor_deps_windows(): | CODE |
| LOW | setup.py | 303 | def _fix_windows_arch_mismatch(self): | CODE |
| LOW | setup.py | 429 | def copy_extensions_to_source(self): | CODE |
| LOW | test/test_sparkline.py | 19 | def test_get_bars__in_wsl_and_windows_terminal(monkeypatch): | CODE |
| LOW⚡ | test/test_sparkline.py | 35 | def test_generate__up_and_down(): | CODE |
| LOW⚡ | test/test_sparkline.py | 43 | def test_generate__all_zeroes(): | CODE |
| LOW⚡ | test/test_sparkline.py | 51 | def test_generate__with_negative_values(): | CODE |
| LOW | test/test_sparkline.py | 67 | def test_generate__with_max_same_as_actual_max(): | CODE |
| LOW | test/test_sparkline.py | 75 | def test_generate__with_max_below_actual_max(): | CODE |
| LOW | test/test_tracer.py | 117 | def test_sys_monitoring_default(self): | STRING |
| LOW | test/test_tracer.py | 157 | def test_using_sys_monitoring(self): | STRING |
| LOW | test/test_tracer.py | 166 | def test_set_use_legacy_tracer(self): | STRING |
| LOW | test/test_tracer.py | 187 | def test_pywhere_sysmon_available(self): | STRING |
| LOW | test/test_tracer.py | 240 | def test_function_call_attribution(self): | STRING |
| LOW | test/issues/test-issue167.py | 18 | def get_mean_for_indicator_poor(df, indicator): | CODE |
| LOW | test/issues/test-issue167.py | 28 | def get_mean_for_indicator_better(df, indicator, rnd_cols): | CODE |
| LOW | tests/test_memory_multithreaded_gil_release.py | 48 | def test_worker_alloc_outweighs_main_sleep(tmp_path: Path) -> None: | CODE |
| LOW | tests/test_memory_multithreaded_gil_release.py | 84 | def test_memory_stacks_leaf_is_worker(tmp_path: Path) -> None: | CODE |
| LOW⚡ | tests/test_cli_leak_velocity_zero_elapsed.py | 41 | def test_cli_leak_velocity_no_divide_by_zero_on_short_run(): | CODE |
| LOW⚡ | tests/test_cli_leak_velocity_zero_elapsed.py | 49 | def test_cli_leak_velocity_normal_case(): | CODE |
| LOW⚡ | tests/test_cli_leak_velocity_zero_elapsed.py | 54 | def test_compute_leaks_independent_of_elapsed_time(): | CODE |
| LOW | tests/test_signal_all_threads_cap.py | 52 | def test_cap_caps_signaled_per_call(unwind_module, batch_size): | CODE |
| LOW | tests/test_signal_all_threads_cap.py | 90 | def test_cap_rotates_across_calls(unwind_module, batch_size): | CODE |
| LOW | tests/test_signal_all_threads_cap.py | 133 | def test_cap_is_a_noop_when_under_cap(unwind_module, batch_size): | CODE |
| LOW | tests/test_signal_all_threads_cap.py | 189 | def test_visit_order_is_shuffled_across_calls(unwind_module, batch_size): | CODE |
| LOW | tests/test_cpu_attribution.py | 236 | def test_c_time_attributed_to_call_line(self, profiler, stats): | CODE |
| LOW | tests/test_cpu_attribution.py | 275 | def test_pure_python_no_preceding_call(self, profiler, stats): | CODE |
| LOW | tests/test_cpu_attribution.py | 306 | def test_multi_consecutive_c_calls(self, profiler, stats): | CODE |
| LOW | tests/test_cpu_attribution.py | 359 | def test_thread_at_call_instruction_attributes_to_c(self, profiler, stats): | CODE |
| LOW | tests/test_cpu_attribution.py | 422 | def test_at_call_instruction_attributes_to_c( | CODE |
| LOW | tests/test_cpu_attribution.py | 461 | def test_not_at_call_attributes_to_python( | CODE |
| LOW | tests/test_cpu_attribution.py | 556 | def test_first_body_line_detected(self) -> None: | CODE |
| LOW | tests/test_cpu_attribution.py | 578 | def test_non_loop_line_returns_none(self) -> None: | CODE |
| LOW | tests/test_cpu_attribution.py | 589 | def test_mid_body_line_returns_none(self) -> None: | CODE |
| LOW | tests/test_cpu_attribution.py | 604 | def test_loop_with_calls_returns_none(self) -> None: | CODE |
| LOW | tests/test_cpu_attribution.py | 624 | def test_nested_loop_picks_innermost(self) -> None: | CODE |
| LOW | tests/test_cpu_attribution.py | 651 | def test_loop_body_time_redistributed(self, profiler: ScaleneCPUProfiler, stats: ScaleneStatistics) -> None: | CODE |
| LOW | tests/test_cpu_attribution.py | 702 | def test_no_loop_redistribution_mid_body(self, profiler: ScaleneCPUProfiler, stats: ScaleneStatistics) -> None: | CODE |
| LOW | tests/test_coverup_98.py | 26 | def test_remove_nonexistent_child_pid(): | CODE |
| LOW | tests/test_line_attribution_nested.py | 99 | def test_mallocs_credited_to_allocator_not_caller(tmp_path: Path) -> None: | CODE |
| LOW | tests/test_line_attribution_nested.py | 140 | def test_memory_samples_timeline_only_on_allocator(tmp_path: Path) -> None: | CODE |
| LOW | tests/test_line_attribution_nested.py | 172 | def test_memory_stacks_leaf_is_allocator(tmp_path: Path) -> None: | CODE |
| LOW | tests/test_coverup_121.py | 17 | def test_launch_browser_insecure_on_mac(mock_platform_system): | CODE |
| LOW | tests/test_coverup_121.py | 31 | def test_launch_browser_insecure_on_windows(mock_platform_system): | CODE |
| LOW | tests/test_sysmon_tool_id_conflict.py | 22 | def test_fallback_when_profiler_id_taken(self): | CODE |
| LOW | tests/test_sysmon_tool_id_conflict.py | 51 | def test_fallback_to_legacy_when_all_ids_taken(self): | CODE |
| LOW | tests/test_sysmon_tool_id_conflict.py | 89 | def test_profiling_works_with_id_conflict(self): | CODE |
| LOW | tests/test_sysmon_tool_id_conflict.py | 210 | def test_scalene_with_torch_profiler(self): | STRING |
| LOW | tests/test_memory_multithreaded_stacks.py | 49 | def test_memory_stacks_cover_both_workers(tmp_path: Path) -> None: | CODE |
| LOW | tests/test_memory_multithreaded_stacks.py | 78 | def test_memory_stacks_leaves_are_fixture(tmp_path: Path) -> None: | CODE |
| LOW | tests/test_coverup_131.py | 18 | def test_profile_this_code_without_files_to_profile(scalene_cleanup): | CODE |
| LOW | tests/test_coverup_125.py | 13 | def scalene_setup_and_teardown(): | CODE |
| LOW | tests/test_coverup_125.py | 38 | def test_start_signal_handler(scalene_setup_and_teardown): | CODE |
| LOW⚡ | tests/test_jax_profiler.py | 41 | def test_jax_profiler_is_available_matches_import(self): | CODE |
| LOW⚡ | tests/test_jax_profiler.py | 51 | def test_jax_profiler_get_line_time_default(self): | CODE |
| LOW⚡ | tests/test_jax_profiler.py | 57 | def test_jax_profiler_get_gpu_line_time_default(self): | CODE |
| LOW⚡ | tests/test_jax_profiler.py | 93 | def test_jax_profiler_line_time_conversion(self): | CODE |
| LOW⚡ | tests/test_jax_profiler.py | 103 | def test_jax_profiler_gpu_line_time_conversion(self): | CODE |
| LOW⚡ | tests/test_jax_profiler.py | 113 | def test_jax_profiler_get_all_times(self): | CODE |
| LOW | tests/test_jax_profiler.py | 26 | def test_jax_profiler_extends_base_class(self): | CODE |
| 383 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/test_freethreaded_parity.py | 23 | # ── Workload scripts ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | test/test_freethreaded_parity.py | 156 | # ── Helpers ───────────────────────────────────────────────────────── | STRING |
| MEDIUM | test/test_freethreaded_parity.py | 269 | # ── Test phases ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | test/test_freethreaded_parity.py | 581 | # ── Main ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …t/expensive_benchmarks/docutils_data/docs/dev/todo.txt | 807 | # ================= | COMMENT |
| MEDIUM | formal/extract/scalene_verified_core.py | 1 | # ============================================================================ | COMMENT |
| MEDIUM | formal/extract/scalene_verified_core.py | 18 | # ============================================================================ | COMMENT |
| MEDIUM | tests/test_cpu_attribution.py | 30 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_cpu_attribution.py | 33 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_cpu_attribution.py | 154 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_cpu_attribution.py | 156 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_cpu_attribution.py | 174 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_cpu_attribution.py | 176 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_cpu_attribution.py | 218 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_cpu_attribution.py | 220 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_cpu_attribution.py | 397 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_cpu_attribution.py | 399 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_cpu_attribution.py | 500 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_cpu_attribution.py | 502 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_classifier_soundness.py | 50 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_classifier_soundness.py | 52 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_classifier_soundness.py | 172 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_classifier_soundness.py | 174 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_classifier_soundness.py | 258 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_classifier_soundness.py | 260 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_nested_package_relative_import.py | 15 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tests/test_nested_package_relative_import.py | 17 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | tests/test_nested_package_relative_import.py | 41 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | tests/test_nested_package_relative_import.py | 43 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | tests/test_nested_package_relative_import.py | 64 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | tests/test_nested_package_relative_import.py | 66 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tests/test_child_cmdline.py | 53 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_child_cmdline.py | 55 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_child_cmdline.py | 128 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_child_cmdline.py | 130 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_child_cmdline.py | 153 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_child_cmdline.py | 157 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_issue999_wallclock.py | 26 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_issue999_wallclock.py | 28 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_native_stacks.py | 155 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_native_stacks.py | 157 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_native_stacks.py | 186 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_native_stacks.py | 188 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_native_stacks.py | 928 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_native_stacks.py | 930 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_native_stacks.py | 1270 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_native_stacks.py | 1272 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_native_stacks.py | 1569 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_native_stacks.py | 1571 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_native_stacks.py | 59 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_native_stacks.py | 61 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_native_stacks.py | 752 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_native_stacks.py | 754 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_native_stacks.py | 292 | # --------------------------------------------------------------------------- | STRING |
| MEDIUM | tests/test_native_stacks.py | 294 | # --------------------------------------------------------------------------- | STRING |
| MEDIUM⚡ | tests/test_on_off_windows.py | 94 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_on_off_windows.py | 96 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_on_off_windows.py | 321 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_on_off_windows.py | 323 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_on_off_windows.py | 345 | # --------------------------------------------------------------------------- | COMMENT |
| 7 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/test-size.py | 1 | CODE | |
| LOW | test/test_sparkline.py | 1 | CODE | |
| LOW | test/multiprocessing_test.py | 1 | CODE | |
| LOW | test/multiprocessing_test.py | 3 | CODE | |
| LOW | test/smoketest_issue_1022.py | 39 | CODE | |
| LOW | test/profile_annotation_test.py | 14 | CODE | |
| LOW | test/profile_annotation_test.py | 80 | CODE | |
| LOW | test/small_mp_test.py | 2 | CODE | |
| LOW | test/small_mp_test.py | 3 | CODE | |
| LOW | test/small_mp_test.py | 4 | CODE | |
| LOW | test/threads-test.py | 2 | CODE | |
| LOW | test/testflask-driver.py | 1 | CODE | |
| LOW | test/testflask-driver.py | 2 | CODE | |
| LOW | test/pool-test.py | 1 | CODE | |
| LOW | test/new_mp_test.py | 2 | CODE | |
| LOW | test/testme.py | 2 | CODE | |
| LOW | test/test-martinheinz.py | 1 | CODE | |
| LOW | test/original/bm_richards.py | 12 | CODE | |
| LOW | test/automatic/dataframe/dataframe-select-optimized.py | 3 | CODE | |
| LOW | test/automatic/dataframe/dataframe-select-original.py | 3 | CODE | |
| LOW | test/optimized/bm_richards.py | 12 | CODE | |
| LOW | test/expensive_benchmarks/bm_async_tree_io.py | 24 | CODE | |
| LOW | test/expensive_benchmarks/bm_docutils.py | 6 | CODE | |
| LOW | test/expensive_benchmarks/bm_docutils.py | 10 | CODE | |
| LOW | test/expensive_benchmarks/bm_docutils.py | 12 | CODE | |
| LOW | test/expensive_benchmarks/bm_fannukh.py | 9 | CODE | |
| LOW | test/issues/test-issue167.py | 1 | CODE | |
| LOW | test/issues/test-issue379.py | 1 | CODE | |
| LOW | test/issues/test-issue130.py | 1 | CODE | |
| LOW | test/issues/test-issue266.py | 1 | CODE | |
| LOW | test/issues/test-issue266.py | 3 | CODE | |
| LOW | formal/extract/scalene_verified_core.py | 22 | CODE | |
| LOW | formal/extract/scalene_verified_core.py | 24 | CODE | |
| LOW | formal/extract/scalene_verified_core.py | 25 | CODE | |
| LOW | tests/test_memory_multithreaded_gil_release.py | 22 | CODE | |
| LOW | tests/test_coverup_110.py | 5 | CODE | |
| LOW | tests/test_coverup_98.py | 5 | CODE | |
| LOW | tests/test_line_attribution_nested.py | 17 | CODE | |
| LOW | tests/test_coverup_115.py | 7 | CODE | |
| LOW | tests/test_coverup_115.py | 7 | CODE | |
| LOW | tests/test_coverup_121.py | 6 | CODE | |
| LOW | tests/test_sysmon_tool_id_conflict.py | 135 | CODE | |
| LOW | tests/test_sysmon_tool_id_conflict.py | 221 | CODE | |
| LOW | tests/test_memory_multithreaded_stacks.py | 18 | CODE | |
| LOW | tests/test_coverup_89.py | 7 | CODE | |
| LOW | tests/test_coverup_65.py | 5 | CODE | |
| LOW | tests/test_coverup_34.py | 5 | CODE | |
| LOW | tests/test_coverup_24.py | 5 | CODE | |
| LOW | tests/test_coverup_24.py | 7 | CODE | |
| LOW | tests/test_coverup_55.py | 7 | CODE | |
| LOW | tests/test_coverup_45.py | 5 | CODE | |
| LOW | tests/test_coverup_71.py | 7 | CODE | |
| LOW | tests/test_coverup_71.py | 9 | CODE | |
| LOW | tests/test_memory_arithmetic_smear.py | 23 | CODE | |
| LOW | tests/test_memory_two_allocators.py | 15 | CODE | |
| LOW | tests/test_coverup_54.py | 5 | CODE | |
| LOW | tests/test_coverup_54.py | 6 | CODE | |
| LOW | tests/test_coverup_54.py | 7 | CODE | |
| LOW | tests/test_coverup_54.py | 8 | CODE | |
| LOW | tests/test_coverup_15.py | 6 | CODE | |
| 103 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_sysmon_tool_id_conflict.py | 139 | # Create a test script that uses PyTorch | COMMENT |
| MEDIUM | tests/test_sysmon_tool_id_conflict.py | 225 | # Create a test script that uses torch.profiler | STRING |
| MEDIUM | tests/test_coverup_125.py | 19 | # Create a child process and add its PID to the set | COMMENT |
| MEDIUM | tests/test_jax_profiler.py | 402 | # Create a realistic trace file with multiple events | COMMENT |
| MEDIUM | tests/test_jax_profiler.py | 527 | # Create a temporary trace file | COMMENT |
| MEDIUM | tests/test_tensorflow_profiler.py | 492 | # Create a realistic trace file with multiple events | COMMENT |
| MEDIUM | tests/test_coverup_24.py | 14 | # Create a test function to execute the missing lines/branches | COMMENT |
| MEDIUM | tests/test_coverup_75.py | 28 | # Create a temporary file to ensure the test environment is clean | COMMENT |
| MEDIUM | tests/test_coverup_30.py | 41 | # Create a ScaleneArguments object with default arguments | COMMENT |
| MEDIUM⚡ | tests/test_coverup_20.py | 34 | # Create a dummy profile file | COMMENT |
| MEDIUM⚡ | tests/test_coverup_20.py | 48 | # Create a dummy profile file | COMMENT |
| MEDIUM | tests/test_coverup_15.py | 16 | # Create a temporary directory for the test | COMMENT |
| MEDIUM | tests/test_coverup_53.py | 13 | # Define a fixture to clean up state after each test | COMMENT |
| MEDIUM | tests/test_coverup_53.py | 38 | # Create a Namespace object with the necessary attributes | COMMENT |
| MEDIUM | tests/test_coverup_118.py | 36 | frame = MagicMock() # Create a MagicMock frame to simulate the behavior | CODE |
| MEDIUM | tests/test_coverup_84.py | 18 | # Create a temporary file to simulate the malloc lock file | COMMENT |
| MEDIUM | tests/test_torch_profiler.py | 132 | # Define a JIT function in this file so we know the filename | COMMENT |
| MEDIUM | tests/test_torch_profiler.py | 338 | # Create a test script that uses JIT - must run long enough to profile | COMMENT |
| MEDIUM | tests/test_perthread_stack_stitching.py | 424 | # Create a minimal test script that runs worker threads | COMMENT |
| MEDIUM | tests/test_coverup_109.py | 15 | # Define a simple HTTP server for testing purposes | COMMENT |
| MEDIUM | tests/test_coverup_109.py | 44 | # Create a temporary HTML file | COMMENT |
| MEDIUM | tests/test_coverup_109.py | 45 | temp_dir = tempfile.mkdtemp() # Create a new temporary directory | CODE |
| MEDIUM | tests/test_coverup_91.py | 11 | # Create a mock function to be decorated | COMMENT |
| MEDIUM | tests/test_coverup_17.py | 19 | # Define a process function that will be called by the queue | COMMENT |
| MEDIUM | tests/test_coverup_17.py | 27 | # Create an instance of ScaleneSigQueue | COMMENT |
| MEDIUM⚡ | tests/test_coverup_139.py | 22 | # Create a fake frame object using MagicMock | COMMENT |
| MEDIUM | tests/test_coverup_116.py | 20 | # Create a temporary profile file with some content | COMMENT |
| MEDIUM⚡ | tests/test_coverup_122.py | 12 | # Define a test function to improve coverage | COMMENT |
| MEDIUM⚡ | tests/test_coverup_122.py | 15 | # Create a temporary file to simulate a Python script | COMMENT |
| MEDIUM | tests/test_coverup_137.py | 29 | # Define a dummy function to be decorated | COMMENT |
| MEDIUM | tests/test_coverup_19.py | 15 | # Create a temporary directory to simulate a native package with a .so file | COMMENT |
| MEDIUM | tests/test_coverup_68.py | 18 | # Define the source and destination dictionaries | COMMENT |
| MEDIUM | tests/test_coverup_133.py | 10 | # Create a dummy function to profile | COMMENT |
| MEDIUM | scalene/scalene_profiler.py | 411 | # Create a temporary directory to hold aliases to the Python | COMMENT |
| MEDIUM | scalene/scalene_utility.py | 852 | # Create a new error with just the custom message | COMMENT |
| MEDIUM | scalene/scalene_magics.py | 40 | # Create a file to hold the supplied code. | COMMENT |
| MEDIUM | scalene/launchbrowser.py | 26 | # Create a temporary directory | COMMENT |
| MEDIUM | scalene/launchbrowser.py | 28 | # Create a command with the required flags | COMMENT |
| MEDIUM | scalene/scalene_tensorflow.py | 114 | # Create a temporary directory for traces | COMMENT |
| MEDIUM | scalene/scalene_signals.py | 1 | # Import the necessary libraries. | COMMENT |
| MEDIUM | scalene/scalene_statistics.py | 569 | # Create a temporary instance to inspect attributes | COMMENT |
| MEDIUM | scalene/scalene_statistics.py | 705 | # Initialize statistics classes | COMMENT |
| MEDIUM | scalene/scalene_statistics.py | 871 | # Create a file in the Python alias directory with the relevant info. | COMMENT |
| MEDIUM | scalene/scalene_jax.py | 65 | # Create a temporary directory for traces | COMMENT |
| MEDIUM | scalene/scalene_windows.py | 151 | # Create a C callback wrapper | COMMENT |
| MEDIUM | scalene/scalene_analysis.py | 33 | # This module is not installed or something else went wrong; fail gracefully. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | setup.py | 179 | print("Please install Node.js and run 'npm install && npm run build' in scalene/scalene-gui/") | CODE |
| HIGH | tests/test_runningstats.py | 22 | rstats.push(value) | CODE |
| HIGH | tests/test_coverup_41.py | 16 | running_stats.push(1) | CODE |
| HIGH | tests/test_coverup_41.py | 18 | running_stats.push(2) | CODE |
| HIGH⚡ | tests/test_coverup_4.py | 16 | running_stats.push(10.0) | CODE |
| HIGH⚡ | tests/test_coverup_4.py | 22 | running_stats.push(20.0) | CODE |
| HIGH⚡ | tests/test_coverup_4.py | 28 | running_stats.push(5.0) | CODE |
| HIGH | tests/test_eintr_retry.py | 149 | int poll_ok = (r==0 && e>=380); | CODE |
| HIGH | tests/test_eintr_retry.py | 159 | int select_ok = (r==0 && e>=380); | CODE |
| HIGH⚡ | tests/test_eintr_retry.py | 177 | int sigint_ok = (r<0 && errno==EINTR && sigints>0 && e<1000); | CODE |
| HIGH⚡ | tests/test_eintr_retry.py | 181 | return (poll_ok && select_ok && sigint_ok) ? 0 : 1; | CODE |
| HIGH⚡ | tests/test_coverup_40.py | 11 | stats.push(10) | CODE |
| HIGH⚡ | tests/test_coverup_40.py | 12 | stats.push(20) | CODE |
| HIGH⚡ | tests/test_coverup_40.py | 13 | stats.push(5) | CODE |
| HIGH⚡ | tests/test_coverup_39.py | 11 | stats.push(1) | CODE |
| HIGH⚡ | tests/test_coverup_39.py | 12 | stats.push(2) | CODE |
| HIGH⚡ | tests/test_coverup_39.py | 13 | stats.push(3) | CODE |
| HIGH | scalene/scalene_output.py | 364 | file=null, | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 124 | # Check if node_modules exists (dependencies installed) | COMMENT |
| LOW | test/smoketest.py | 62 | # Check if the target path parts appear at the end of the profiled path | COMMENT |
| LOW | tests/test_coverup_88.py | 22 | # Check if __in_jupyter is now True | COMMENT |
| LOW | tests/test_coverup_31.py | 15 | # Set attributes to non-default values | COMMENT |
| LOW | tests/test_coverup_31.py | 23 | # Check if the attributes are reset to their default values | COMMENT |
| LOW⚡ | tests/test_coverup_15.py | 31 | # Check if the sys.executable has been changed | COMMENT |
| LOW⚡ | tests/test_coverup_15.py | 33 | # Check if the sys.path has been updated | COMMENT |
| LOW⚡ | tests/test_coverup_15.py | 35 | # Check if the PATH environment variable has been updated | COMMENT |
| LOW⚡ | tests/test_coverup_15.py | 37 | # Check if the files have been created | COMMENT |
| LOW | tests/test_coverup_118.py | 39 | frame.f_back = None # Set f_back to None to trigger the return in line 1171 | CODE |
| LOW | tests/test_coverup_77.py | 16 | # Check if elapsed_time has been updated | COMMENT |
| LOW | tests/test_coverup_77.py | 18 | # Check if start_time has been reset to 0 | COMMENT |
| LOW | tests/test_torch_profiler.py | 368 | # Check if profile was generated | STRING |
| LOW | tests/test_torch_profiler.py | 376 | # Check if we have files to analyze | STRING |
| LOW | tests/test_perthread_stack_stitching.py | 416 | # Check if native unwinding is available | COMMENT |
| LOW | tests/test_coverup_109.py | 73 | # Check if the current directory was restored | COMMENT |
| LOW⚡ | tests/test_coverup_139.py | 26 | # Check if the queue put method was called with the correct arguments | COMMENT |
| LOW | tests/test_coverup_116.py | 31 | # Check if the output file was created and has content | COMMENT |
| LOW | tests/test_coverup_116.py | 37 | # Check if the output file contains the profile content | COMMENT |
| LOW | tests/test_coverup_106.py | 27 | # Check if the signal.SIGVTALRM is in the returned tuple | COMMENT |
| LOW | tests/test_coverup_106.py | 29 | # Check if the returned tuple only contains timer signals | COMMENT |
| LOW | tests/test_coverup_59.py | 27 | # Check if decimation occurred | COMMENT |
| LOW | tests/test_coverup_59.py | 31 | # Check if the median was correctly calculated | COMMENT |
| LOW | tests/test_coverup_59.py | 56 | # Check if decimation occurred | COMMENT |
| LOW | tests/test_coverup_59.py | 60 | # Check if the median was correctly calculated | COMMENT |
| LOW | tests/test_coverup_107.py | 24 | # Check if Scalene is now initialized | COMMENT |
| LOW | scalene/scalene_memory_profiler.py | 191 | # Iterate through the array to compute the new current footprint | COMMENT |
| LOW | scalene/scalene_profiler.py | 1165 | # Check if it's time to print profiling info. | COMMENT |
| LOW | scalene/scalene_utility.py | 273 | # Set frame to None so we skip this frame entirely. | COMMENT |
| LOW | scalene/scalene_parseargs.py | 266 | # Check if --help-advanced is in the arguments | COMMENT |
| LOW | scalene/scalene_parseargs.py | 810 | # Check if we should print this line | COMMENT |
| LOW | scalene/scalene_parseargs.py | 954 | # Check if the profile file exists | COMMENT |
| LOW | scalene/scalene_parseargs.py | 1159 | # Check if user provided a .py file without a subcommand | STRING |
| LOW | scalene/scalene_parseargs.py | 1168 | # Check if any argument looks like a Python file or module | STRING |
| LOW | scalene/scalene_tensorflow.py | 22 | # Check if TensorFlow is available at import time | COMMENT |
| LOW | scalene/scalene_torch.py | 19 | # Check if PyTorch is available at import time | COMMENT |
| LOW | scalene/scalene_tracing.py | 93 | # Check if this function is specifically decorated for profiling | COMMENT |
| LOW | scalene/scalene_tracing.py | 232 | # Check if the file is in the same directory tree as the program being profiled. | COMMENT |
| LOW | scalene/scalene_tracing.py | 236 | # Check if file is in program's directory or a subdirectory | COMMENT |
| LOW | scalene/scalene_json.py | 505 | # Check if this line has PyTorch profiler timing (for JIT-compiled code) | COMMENT |
| LOW | scalene/scalene_json.py | 668 | # Check if the function at this line is a coroutine | COMMENT |
| LOW | scalene/scalene_tracer.py | 21 | # Check if we're running Python 3.12+ where sys.monitoring is available | COMMENT |
| LOW | scalene/scalene_tracer.py | 24 | # Check if we're running Python 3.12+ where the C API for sys.monitoring is available | COMMENT |
| LOW | scalene/scalene_tracer.py | 230 | # Check if we're still on the same line | COMMENT |
| LOW | scalene/scalene_tracer.py | 236 | # Check if the original line is still on the call stack. | COMMENT |
| LOW | scalene/scalene_jax.py | 22 | # Check if JAX is available at import time | COMMENT |
| LOW | scalene/set_nvidia_gpu_modes.py | 38 | # Check if the script is running as root | COMMENT |
| LOW | scalene/scalene_cpu_profiler.py | 457 | # Check if the original caller is stuck inside a call | COMMENT |
| LOW | scalene/merge_scalene_neuron_profiles.py | 41 | # Check if source matches any of the files in scalene profile | COMMENT |
| LOW⚡ | scalene/merge_scalene_neuron_profiles.py | 85 | # Check if CPU sample overlaps with any interval (strict overlap) | COMMENT |
| LOW⚡ | scalene/merge_scalene_neuron_profiles.py | 87 | # Check if CPU sample falls within interval exactly | COMMENT |
| LOW | scalene/merge_scalene_neuron_profiles.py | 278 | # Check if this line has neuron events | COMMENT |
| LOW | scalene/scalene_analysis.py | 62 | # Check if the node represents an import statement | COMMENT |
| LOW | scalene/scalene_analysis.py | 92 | # Check if the node represents an import from statement | COMMENT |
| LOW | scalene/scalene_nvidia_gpu.py | 57 | # Check if each GPU has accounting mode set. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mypy.ini | 21 | # It's useful to try this occasionally, and keep it clean; but when | COMMENT |
| LOW | setup.py | 521 | COMMENT | |
| LOW | .readthedocs.yaml | 21 | # builder: "dirhtml" | COMMENT |
| LOW | test/test_freethreaded_parity.py | 541 | print(f"\n Memory scaling (8T / 1T): {ratio_8_to_1:.2f}x (nominal 8x)") | COMMENT |
| LOW | test/original/bm_pyflate.py | 361 | base[symbol] += 1 | COMMENT |
| LOW | test/optimized/bm_raytrace.py | 421 | # args.width, args.height, | COMMENT |
| LOW | …e_benchmarks/docutils_data/docs/dev/enthought-plan.txt | 181 | Python doesn't have multi-line comments; only single-line. A similar | COMMENT |
| LOW | formal/extract/scalene_verified_core.py | 1 | # ============================================================================ | COMMENT |
| LOW | tests/test_classifier_soundness.py | 261 | # | COMMENT |
| LOW | tests/test_classifier_soundness.py | 281 | # actual interruption — but that is the mechanism under test, so using it as its | COMMENT |
| LOW | tests/test_coverup_14.py | 21 | assert len(signals) == len(set(signals)) | COMMENT |
| LOW | tests/test_eintr_retry.py | 101 | # re-armed from the SIGALRM handler via setitimer() on every tick (exactly what | COMMENT |
| LOW | tests/test_coverup_17.py | 61 | # Before each test | COMMENT |
| LOW | tests/test_native_stacks.py | 561 | """) | COMMENT |
| LOW | tests/test_native_stacks.py | 681 | # At least one of the two phases should produce a classified run — | COMMENT |
| LOW | scalene/scalene_memory_profiler.py | 281 | # | COMMENT |
| LOW | scalene/scalene_memory_profiler.py | 301 | # next legitimate sparkline sample reflects the right | COMMENT |
| LOW | scalene/replacement_asyncio.py | 21 | # Nothing to do here - activation is handled by the profiler | COMMENT |
| LOW | scalene/scalene_arguments.py | 121 | whose dest async_profile defaults to True). | COMMENT |
| LOW | scalene/scalene_profiler.py | 741 | # sparkline) is driven by __last_profiled, updated from this async | COMMENT |
| LOW | scalene/scalene_profiler.py | 841 | ) | COMMENT |
| LOW | scalene/scalene_profiler.py | 921 | COMMENT | |
| LOW | scalene/scalene_profiler.py | 1941 | # When running "python -c <code> <args>", sys.argv is ['-c'] + <args> | COMMENT |
| LOW | scalene/scalene_utility.py | 101 | # into the timeline is retained for the lifetime of the profile). At high | COMMENT |
| LOW | scalene/scalene_utility.py | 1021 | COMMENT | |
| LOW | scalene/scalene_signal_manager.py | 241 | COMMENT | |
| LOW | scalene/scalene_json.py | 161 | COMMENT | |
| LOW | scalene/scalene_json.py | 401 | # Stitched Python+native call stacks (emitted when --stacks is set). | COMMENT |
| LOW | scalene/scalene_json.py | 761 | 100.0 | COMMENT |
| LOW | scalene/scalene_json.py | 801 | stack_stats_dict = { | COMMENT |
| LOW | scalene/scalene_json.py | 1021 | native_samples = stats.memory_stats.memory_malloc_samples.get( | COMMENT |
| LOW | scalene/scalene_json.py | 1161 | # boundary (preserves the existing JSON layout). | COMMENT |
| LOW | scalene/scalene_statistics.py | 661 | # frame tuples (outermost-first). Native IPs are resolved (and | COMMENT |
| LOW | scalene/scalene_statistics.py | 681 | COMMENT | |
| LOW | scalene/scalene_cpu_profiler.py | 121 | self._stats.gpu_stats.total_gpu_samples += gpu_time | COMMENT |
| LOW | scalene/scalene_cpu_profiler.py | 241 | # instruction. If so, the signal was likely deferred during that | COMMENT |
| LOW | scalene/scalene-gui/scalene-gui.ts | 1201 | // so frame widths are proportional to bytes attributed to that call path | COMMENT |
| LOW | scalene/scalene-gui/scalene-gui.ts | 1381 | // - Top: time-axis ruler with labeled ticks at a "nice" interval | COMMENT |
| LOW | scalene/scalene-gui/scalene-gui.ts | 1401 | const TIMELINE_BUCKETS = 600; // resolution along x (vertical pixel columns). | COMMENT |
| LOW | scalene/scalene-gui/scalene-gui.ts | 1821 | // Format a time value in seconds for the axis ruler. Uses ms for values | COMMENT |
| LOW | benchmarks/new_benchmark.py | 1 | import json | COMMENT |
| LOW | benchmarks/new_benchmark.py | 21 | # "run", | COMMENT |
| LOW | .github/workflows/tests.yml | 21 | jobs: | COMMENT |
| LOW | .github/workflows/test-smoketests.yml | 61 | # always-passing checks come last as smoke for the lifecycle bits. | COMMENT |
| LOW | src/include/sampleheap.hpp | 1 | #pragma once | COMMENT |
| LOW | src/include/sampleheap.hpp | 21 | #include <sys/types.h> | COMMENT |
| LOW | src/include/samplefile_win.hpp | 1 | #pragma once | COMMENT |
| LOW | src/include/common_win.hpp | 1 | #pragma once | COMMENT |
| LOW | src/include/common_win.hpp | 21 | #else | COMMENT |
| LOW | src/include/common_win.hpp | 41 | #endif | COMMENT |
| LOW | src/include/traceconfig.hpp | 1 | #pragma once | COMMENT |
| LOW | src/include/traceconfig.hpp | 101 | // Return false if filename contains paths corresponding to the native | COMMENT |
| LOW | src/include/traceconfig.hpp | 121 | // parent directory that is not literally called "scalene". | COMMENT |
| LOW | src/include/eintr_retry.hpp | 1 | // -*- C++ -*- | COMMENT |
| LOW | src/include/eintr_retry.hpp | 21 | // report (issue #1060) is the Microsoft ODBC Driver 18 for SQL Server: its TCP | COMMENT |
| LOW | src/include/eintr_retry.hpp | 41 | // is returned to the caller unchanged. | COMMENT |
| LOW | src/include/eintr_retry.hpp | 61 | namespace scalene { | COMMENT |
| LOW | src/include/eintr_retry.hpp | 81 | COMMENT | |
| LOW | src/include/sampler.hpp | 1 | #pragma once | COMMENT |
| LOW | src/include/sampler.hpp | 21 | COMMENT | |
| 25 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 425 | except Exception as e: | CODE |
| LOW | tests/test_sysmon_tool_id_conflict.py | 240 | except Exception as e: | CODE |
| LOW | scalene/scalene_profiler.py | 365 | except Exception as e: | CODE |
| LOW | scalene/scalene_profiler.py | 1338 | except Exception: | CODE |
| LOW | scalene/scalene_profiler.py | 1402 | except Exception: | CODE |
| LOW | scalene/scalene_profiler.py | 1453 | except Exception: | CODE |
| LOW | scalene/scalene_profiler.py | 1566 | except Exception as e: | CODE |
| LOW | scalene/scalene_profiler.py | 1844 | except Exception as e: | CODE |
| LOW | scalene/scalene_profiler.py | 1921 | except Exception: | CODE |
| LOW | scalene/scalene_profiler.py | 1963 | except Exception: | CODE |
| LOW | scalene/scalene_profiler.py | 1992 | except Exception as ex: | CODE |
| LOW | scalene/scalene_profiler.py | 2105 | except Exception as ex: | CODE |
| LOW | scalene/scalene_profiler.py | 2124 | except Exception: | CODE |
| LOW | scalene/scalene_utility.py | 201 | except Exception: | CODE |
| LOW | scalene/scalene_utility.py | 344 | except Exception: | CODE |
| LOW | scalene/scalene_utility.py | 378 | except Exception: | CODE |
| LOW | scalene/scalene_utility.py | 399 | except Exception: | CODE |
| LOW | scalene/scalene_utility.py | 417 | except Exception: | CODE |
| LOW | scalene/scalene_utility.py | 432 | except Exception: | CODE |
| LOW | scalene/scalene_utility.py | 452 | except Exception: | CODE |
| LOW | scalene/scalene_utility.py | 465 | except Exception: | CODE |
| LOW | scalene/scalene_utility.py | 494 | except Exception: | CODE |
| LOW | scalene/scalene_parseargs.py | 971 | except Exception as e: | CODE |
| LOW | scalene/scalene_tensorflow.py | 145 | except Exception: | CODE |
| LOW | scalene/scalene_tensorflow.py | 164 | except Exception: | CODE |
| LOW | scalene/scalene_async.py | 314 | except Exception: | CODE |
| LOW | scalene/scalene_torch.py | 115 | except Exception: | CODE |
| LOW | scalene/scalene_torch.py | 150 | except Exception: | CODE |
| LOW | scalene/scalene_torch.py | 152 | except Exception: | CODE |
| LOW | scalene/scalene_torch.py | 169 | except Exception: | CODE |
| LOW | scalene/scalene_torch.py | 178 | except Exception: | CODE |
| LOW | scalene/scalene_torch.py | 219 | except Exception: | CODE |
| LOW | scalene/scalene_torch.py | 248 | except Exception: | CODE |
| LOW | scalene/scalene_tracing.py | 191 | except Exception: | CODE |
| LOW | scalene/scalene_json.py | 103 | except Exception: | CODE |
| LOW | scalene/scalene_apple_gpu.py | 225 | except Exception: | CODE |
| LOW | scalene/scalene_jax.py | 72 | except Exception: | CODE |
| LOW | scalene/scalene_jax.py | 91 | except Exception: | CODE |
| MEDIUM | scalene/scalene_neuron.py | 195 | print(f"Error decoding JSON: {e}") | CODE |
| LOW | scalene/scalene_neuron.py | 196 | except Exception as e: | CODE |
| MEDIUM | scalene/scalene_neuron.py | 96 | def has_gpu(self) -> bool: | CODE |
| LOW | scalene/scalene_windows.py | 136 | except Exception as e: | CODE |
| MEDIUM | scalene/merge_scalene_neuron_profiles.py | 121 | print(f"Error parsing {scalene_file}: {e}") | CODE |
| LOW | scalene/scalene_library_profiler.py | 178 | except Exception: | CODE |
| LOW | scalene/scalene_library_profiler.py | 203 | except Exception: | CODE |
| LOW | scalene/__main__.py | 12 | except Exception as exc: | CODE |
| MEDIUM | scalene/__main__.py | 5 | def main() -> None: | CODE |
| LOW | scalene/scalene_mapfile.py | 262 | except Exception: | CODE |
| MEDIUM | scalene/redirect_python.py | 40 | print(f"Error writing to {fname}: {e}") | CODE |
| LOW | scalene/scalene_lifecycle.py | 162 | except Exception: | CODE |
| LOW | scalene/scalene_lifecycle.py | 184 | except Exception: | CODE |
| LOW | benchmarks/benchmark.py | 208 | except Exception as err: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/test_tracer.py | 104 | CODE | |
| LOW | test/test_tracer.py | 240 | CODE | |
| LOW | test/original/bm_scimark.py | 226 | CODE | |
| LOW | test/original/bm_pyflate.py | 398 | CODE | |
| LOW | test/original/bm_pyflate.py | 551 | CODE | |
| LOW | test/optimized/bm_scimark.py | 228 | CODE | |
| LOW | test/optimized/bm_pyflate.py | 401 | CODE | |
| LOW | test/optimized/bm_pyflate.py | 558 | CODE | |
| LOW | tests/test_multiprocessing_pool_spawn.py | 19 | CODE | |
| LOW | tests/test_coverup_71.py | 13 | CODE | |
| LOW | tests/test_coverup_87.py | 80 | CODE | |
| LOW | tests/test_perthread_stack_stitching.py | 402 | CODE | |
| LOW | tests/test_memory_stacks_bigmem.py | 43 | CODE | |
| LOW | scalene/scalene_preload.py | 23 | CODE | |
| LOW | scalene/scalene_memory_profiler.py | 102 | CODE | |
| LOW | scalene/scalene_profiler.py | 885 | CODE | |
| LOW | scalene/scalene_profiler.py | 1012 | CODE | |
| LOW | scalene/scalene_profiler.py | 1808 | CODE | |
| LOW | scalene/scalene_utility.py | 572 | CODE | |
| LOW | scalene/scalene_utility.py | 654 | CODE | |
| LOW | scalene/scalene_signal_manager.py | 377 | CODE | |
| LOW | scalene/scalene_parseargs.py | 199 | CODE | |
| LOW | scalene/scalene_parseargs.py | 585 | CODE | |
| LOW | scalene/scalene_tensorflow.py | 47 | CODE | |
| LOW | scalene/scalene_torch.py | 185 | CODE | |
| LOW | scalene/scalene_tracing.py | 131 | CODE | |
| LOW | scalene/scalene_json.py | 708 | CODE | |
| LOW | scalene/scalene_output.py | 277 | CODE | |
| LOW | scalene/scalene_statistics.py | 907 | CODE | |
| LOW | scalene/scalene_neuron.py | 125 | CODE | |
| LOW | scalene/scalene_cpu_profiler.py | 61 | CODE | |
| LOW | scalene/merge_scalene_neuron_profiles.py | 9 | CODE | |
| LOW | scalene/merge_scalene_neuron_profiles.py | 96 | CODE | |
| LOW | scalene/scalene_library_profiler.py | 163 | CODE | |
| LOW | scalene/scalene_analysis.py | 18 | CODE | |
| LOW | scalene/scalene_analysis.py | 69 | CODE | |
| LOW | scalene/scalene_analysis.py | 101 | CODE | |
| LOW | scalene/scalene_analysis.py | 136 | CODE | |
| LOW | scalene/scalene_analysis.py | 168 | CODE | |
| LOW | scalene/scalene_analysis.py | 175 | CODE | |
| LOW | scalene/scalene_nvidia_gpu.py | 112 | CODE | |
| LOW | benchmarks/new_benchmark.py | 42 | CODE | |
| LOW | benchmarks/pystone.py | 198 | CODE | |
| LOW | benchmarks/measure_profiler_memory.py | 42 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scalene/scalene_profiler.py | 581 | def update_line() -> None: | CODE |
| LOW | scalene/scalene_profiler.py | 586 | def update_profiled() -> None: | CODE |
| LOW | scalene/scalene_profiler.py | 641 | def set_thread_sleeping(tid: int) -> None: | CODE |
| LOW | scalene/scalene_profiler.py | 1090 | def _set_in_jupyter() -> None: | CODE |
| LOW | scalene/scalene_profiler.py | 1737 | def set_initialized() -> None: | CODE |
| LOW | scalene/scalene_signal_manager.py | 80 | def set_timer_signals(self, enabled: bool) -> None: | CODE |
| LOW | scalene/scalene_tracing.py | 43 | def set_args(self, args: ScaleneArguments) -> None: | CODE |
| LOW | scalene/scalene_tracing.py | 49 | def set_program_path(self, program_path: Filename) -> None: | CODE |
| LOW | scalene/scalene_signals.py | 49 | def set_timer_signals(self, use_virtual_time: bool = True) -> None: | CODE |
| LOW | scalene/scalene_tracer.py | 47 | def set_use_legacy_tracer(use_legacy: bool) -> None: | CODE |
| LOW | scalene/scalene_tracer.py | 57 | def set_use_python_callback(use_python: bool) -> None: | CODE |
| LOW | scalene/scalene_tracer.py | 164 | def _setup_monitoring(cls) -> None: | CODE |
| LOW | scalene/scalene_apple_gpu.py | 191 | def set_torch_mps_time(self, time_seconds: float) -> None: | CODE |
| LOW | scalene/scalene_neuron.py | 59 | def _update_line(self) -> None: | CODE |
| LOW | scalene/scalene_windows.py | 140 | def set_where_in_python(self, func) -> None: | CODE |
| LOW | scalene/scalene_windows.py | 156 | def set_done(self, done: bool) -> None: | CODE |
| LOW | scalene/scalene_client_timer.py | 24 | def set_itimer(self, seconds: float, interval: float) -> None: | CODE |
| LOW | scalene/scalene_lifecycle.py | 60 | def set_initialized(self) -> None: | CODE |
| LOW | scalene/scalene_lifecycle.py | 74 | def set_child_info(self, is_child: bool, pid: int) -> None: | CODE |
| LOW | scalene/scalene_lifecycle.py | 79 | def set_python_alias_dir(self, path: Path) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | test/original/bm_raytrace.py | 0 | this file contains definitions for a simple raytracer. copyright callum and tony garnock-jones, 2008. this file may be f | STRING |
| HIGH | test/optimized/bm_raytrace.py | 0 | this file contains definitions for a simple raytracer. copyright callum and tony garnock-jones, 2008. this file may be f | STRING |
| HIGH | test/expensive_benchmarks/bm_raytrace.py | 0 | this file contains definitions for a simple raytracer. copyright callum and tony garnock-jones, 2008. this file may be f | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | scalene/scalene-gui/jquery-3.6.0.slim.min.js | 2 | !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):f | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 291 | # so it seems best to just use them and let it error out if not recognized. | COMMENT |
| LOW | tests/test_coverup_66.py | 39 | # Mock webbrowser.get().open to simply return True | COMMENT |
| MEDIUM | scalene/scalene-gui/package-lock.json | 2585 | "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", | CODE |
| MEDIUM | src/include/traceconfig.hpp | 119 | // installed ``scalene.__file__``). This is the robust check: it | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/original/bm_pyflate.py | 236 | CODE | |
| MEDIUM | test/optimized/bm_scimark.py | 20 | CODE | |
| MEDIUM | test/optimized/bm_scimark.py | 22 | CODE | |
| MEDIUM | test/optimized/bm_pyflate.py | 237 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | scalene/scalene_parseargs.py | 164 | Load and parse a YAML configuration file. Args: config_path: Path to the YAML config file | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_coverup_55.py | 20 | def my_method(self): | CODE |
| LOW | tests/test_coverup_16.py | 12 | def my_method(self): | CODE |
| LOW | scalene/scalene-gui/scalene-gui.ts | 3046 | function doSomething(e: ProgressEvent<FileReader>): void { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scalene/scalene_tensorflow.py | 10 | This is a basic implementation that captures overall timing. | STRING |
| MEDIUM | scalene/scalene_jax.py | 10 | This is a basic implementation that captures overall timing. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_coverup_66.py | 58 | # we don't have direct access to the variable name. We need to check if the directory | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …xpensive_benchmarks/docutils_data/docs/user/config.txt | 977 | example, "abc@example.org" will be output as:: | CODE |