codegreen 0.4.3__tar.gz → 0.4.4__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.
- {codegreen-0.4.3/codegreen.egg-info → codegreen-0.4.4}/PKG-INFO +1 -1
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/__init__.py +1 -1
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/cli/cli.py +123 -12
- {codegreen-0.4.3 → codegreen-0.4.4/codegreen.egg-info}/PKG-INFO +1 -1
- {codegreen-0.4.3 → codegreen-0.4.4}/pyproject.toml +1 -1
- {codegreen-0.4.3 → codegreen-0.4.4}/CMakeLists.txt +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/LICENSE +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/MANIFEST.in +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/README.md +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/__init__.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/__main__.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/_workload_gpt2.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/_workload_gpt2_session.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/cg_modes_compare.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/compilers.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/config.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/harness.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/profilers.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/results.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/suites/__init__.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/suites/base.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/suites/benchmarksgame.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/suites/dacapo.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/suites/perfopt.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/suites/renaissance.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/validation/__init__.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/validation/analysis.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/validation/experiments.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/benchmark/validation/reporting.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analysis/__init__.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analysis/_ts_java.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analysis/cfg/__init__.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analysis/cfg/builder.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analysis/cfg/callgraph.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analysis/cfg/dataflow.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analysis/cfg/energy_flow.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analysis/cfg/features.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analysis/cfg/pdg.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analysis/cfg/types.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analysis/cfg/visualization.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analyzer/__init__.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/analyzer/plot.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/cli/__init__.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/cli/entrypoint.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/config.json +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/__init__.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/ast_processor.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/bridge_analyze.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/bridge_instrument.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/config.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/configs/TEMPLATE.json +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/configs/c.json +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/configs/cpp.json +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/configs/java.json +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/configs/javascript.json +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/configs/python.json +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/engine.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/language_configs.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/language_engine.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/language_runtimes/c/codegreen_runtime.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/language_runtimes/cpp/codegreen/runtime.hpp +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/language_runtimes/java/codegreen/runtime/CodeGreenRuntime.java +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/language_runtimes/java/codegreen/runtime/CodeGreenStandaloneRuntime.java +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/instrumentation/language_runtimes/python/codegreen_runtime.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/utils/__init__.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/utils/binary.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen/utils/platform.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen.egg-info/SOURCES.txt +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen.egg-info/dependency_links.txt +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen.egg-info/entry_points.txt +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen.egg-info/not-zip-safe +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen.egg-info/requires.txt +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/codegreen.egg-info/top_level.txt +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/requirements.txt +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/setup.cfg +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/setup.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/tests/test_instrumentation.py +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/binarytrees/2.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/helloworld/1.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/knucleotide/1.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/mandelbrot/1-ffi.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/mandelbrot/1-mffi.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/nbody/2.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/nbody/5.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/nbody/8-i.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/nsieve/1.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/spectral-norm/3.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/spectral-norm/4.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/spectral-norm/5-im.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/Programming-Language-Benchmarks/bench/algorithm/spectral-norm/6-im.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/aligned_indent.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/array.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/comment.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/compound_lit.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/cond.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/enum.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/expr.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/func.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/if_else.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/issue-1568.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/issue-2086.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/issue-4079.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/issue-4117.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/issue-4525.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/label.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/loop.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/no_braces.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/preproc_cond.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/preproc_func.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/string.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/struct.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/switch.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/ternary.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/unfinished_comment.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/query/highlights/c/enums-as-constants.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/crates/cli/src/templates/PARSER_NAME.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/crates/cli/src/templates/py-binding.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/crates/generate/src/templates/alloc.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/crates/generate/src/templates/array.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/crates/highlight/include/tree_sitter/highlight.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/crates/tags/include/tree_sitter/tags.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/CMakeLists.txt +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/binding_web/lib/tree-sitter.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/include/tree_sitter/api.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/alloc.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/alloc.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/array.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/atomic.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/clock.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/error_costs.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/get_changed_ranges.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/get_changed_ranges.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/host.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/language.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/language.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/length.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/lexer.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/lexer.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/lib.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/node.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/parser.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/parser.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/point.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/portable/endian.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/query.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/reduce_action.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/reusable_node.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/stack.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/stack.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/subtree.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/subtree.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/tree.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/tree.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/tree_cursor.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/tree_cursor.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/ts_assert.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/unicode/ptypes.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/unicode/umachine.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/unicode/urename.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/unicode/utf.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/unicode/utf16.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/unicode/utf8.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/unicode.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/wasm/stdlib.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/wasm/wasm-stdlib.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/wasm_store.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/src/wasm_store.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/test/fixtures/test_grammars/depends_on_column/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/test/fixtures/test_grammars/epsilon_external_extra_tokens/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/test/fixtures/test_grammars/epsilon_external_tokens/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/test/fixtures/test_grammars/external_and_internal_anonymous_tokens/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/test/fixtures/test_grammars/external_and_internal_tokens/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/test/fixtures/test_grammars/external_extra_tokens/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/test/fixtures/test_grammars/external_tokens/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/test/fixtures/test_grammars/external_unicode_column_alignment/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/test/fixtures/test_grammars/get_col_eof/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/test/fixtures/test_grammars/get_col_should_hang_not_crash/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/test/fixtures/test_grammars/inverted_external_token/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/test/fixtures/test_grammars/uses_current_column/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/CMakeLists.txt +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/bindings/c/tree_sitter/tree-sitter-c.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/bindings/python/tree_sitter_c/binding.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/bindings/swift/TreeSitterC/c.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/examples/cluster.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/examples/malloc.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/examples/parser.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/src/parser.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/src/tree_sitter/alloc.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/src/tree_sitter/array.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/src/tree_sitter/parser.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/test/highlight/keywords.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/test/highlight/names.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-cpp/CMakeLists.txt +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-cpp/bindings/c/tree-sitter-cpp.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-cpp/bindings/python/tree_sitter_cpp/binding.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-cpp/bindings/swift/TreeSitterCPP/cpp.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-cpp/examples/marker-index.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-cpp/src/parser.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-cpp/src/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-cpp/src/tree_sitter/alloc.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-cpp/src/tree_sitter/array.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-cpp/src/tree_sitter/parser.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-java/CMakeLists.txt +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-java/bindings/c/tree-sitter-java.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-java/bindings/python/tree_sitter_java/binding.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-java/bindings/swift/TreeSitterJava/java.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-java/src/parser.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-java/src/tree_sitter/alloc.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-java/src/tree_sitter/array.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-java/src/tree_sitter/parser.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-python/CMakeLists.txt +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-python/bindings/c/tree-sitter-python.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-python/bindings/python/tree_sitter_python/binding.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-python/bindings/swift/TreeSitterPython/python.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-python/src/parser.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-python/src/scanner.c +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-python/src/tree_sitter/alloc.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-python/src/tree_sitter/array.h +0 -0
- {codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-python/src/tree_sitter/parser.h +0 -0
|
@@ -12,7 +12,7 @@ try:
|
|
|
12
12
|
from importlib.metadata import version as _pkg_version
|
|
13
13
|
__version__ = _pkg_version("codegreen")
|
|
14
14
|
except Exception:
|
|
15
|
-
__version__ = "0.4.
|
|
15
|
+
__version__ = "0.4.4" # fallback for dev/editable installs
|
|
16
16
|
__author__ = "Saurabhsingh Rajput"
|
|
17
17
|
__email__ = "saurabh@dal.ca"
|
|
18
18
|
__description__ = "Know the true energy cost of your code"
|
|
@@ -165,6 +165,116 @@ def load_config(config_path: Optional[Path] = None) -> Dict[str, Any]:
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
+
|
|
169
|
+
# Hotspot taxonomy. OCP-compliant: each verdict is a *rule* declared as
|
|
170
|
+
# data, evaluated in priority order. Adding a new category is a single
|
|
171
|
+
# entry in HOTSPOT_RULES (and optionally a corresponding block in
|
|
172
|
+
# config.json) -- no change to the dispatch logic. The current rule set
|
|
173
|
+
# matches the historical thresholds at the original cli.py:3424-3435
|
|
174
|
+
# block prior to extraction.
|
|
175
|
+
#
|
|
176
|
+
# Each rule: (verdict, priority, predicate, default-thresholds).
|
|
177
|
+
# Predicate is a callable taking the metrics dict + the resolved
|
|
178
|
+
# threshold dict; lower priority wins when multiple rules match.
|
|
179
|
+
HotspotMetrics = Dict[str, float]
|
|
180
|
+
HotspotThresholds = Dict[str, float]
|
|
181
|
+
HotspotRule = Dict[str, Any]
|
|
182
|
+
|
|
183
|
+
_HOTSPOT_RULES: List[HotspotRule] = [
|
|
184
|
+
{
|
|
185
|
+
"verdict": "wrapper",
|
|
186
|
+
"priority": 10, # filter rule: fires before any actionable type
|
|
187
|
+
"thresholds": {"self_ratio_max": 0.2, "inclusive_pct_min": 5.0},
|
|
188
|
+
"predicate": lambda m, t: (m["self_ratio"] < t["self_ratio_max"]
|
|
189
|
+
and m["inc_pct"] >= t["inclusive_pct_min"]),
|
|
190
|
+
"doc": "Function attributes inclusive energy but body does little work.",
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"verdict": "TYPE_2_INEFFICIENT",
|
|
194
|
+
"priority": 20,
|
|
195
|
+
"thresholds": {"exclusive_pct_min": 5.0, "efficiency_ratio_min": 3.0},
|
|
196
|
+
"predicate": lambda m, t: (m["exc_pct"] >= t["exclusive_pct_min"]
|
|
197
|
+
and m["efficiency_ratio"] > t["efficiency_ratio_min"]),
|
|
198
|
+
"doc": "Energy-per-call >> median: microarchitectural inefficiency.",
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"verdict": "TYPE_1_DIRECT",
|
|
202
|
+
"priority": 30,
|
|
203
|
+
"thresholds": {"exclusive_pct_min": 10.0},
|
|
204
|
+
"predicate": lambda m, t: m["exc_pct"] >= t["exclusive_pct_min"],
|
|
205
|
+
"doc": "High exclusive energy: optimise the function body itself.",
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"verdict": "TYPE_5_FREQUENCY",
|
|
209
|
+
"priority": 40,
|
|
210
|
+
"thresholds": {"calls_min": 100000, "exclusive_pct_min": 3.0,
|
|
211
|
+
"efficiency_ratio_max": 1.5},
|
|
212
|
+
"predicate": lambda m, t: (m["calls"] > t["calls_min"]
|
|
213
|
+
and m["exc_pct"] >= t["exclusive_pct_min"]
|
|
214
|
+
and m["efficiency_ratio"] < t["efficiency_ratio_max"]),
|
|
215
|
+
"doc": "High call count, low per-call cost: batch or cache.",
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"verdict": "TYPE_1_DIRECT",
|
|
219
|
+
"priority": 50, # relaxed fallback below the strict 10% bar
|
|
220
|
+
"thresholds": {"exclusive_pct_min": 3.0},
|
|
221
|
+
"predicate": lambda m, t: m["exc_pct"] >= t["exclusive_pct_min"],
|
|
222
|
+
"doc": "Relaxed Type-1 fallback for moderate exclusive shares.",
|
|
223
|
+
},
|
|
224
|
+
]
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def _resolved_thresholds(rule: HotspotRule, config: Optional[Dict[str, Any]]) -> HotspotThresholds:
|
|
228
|
+
"""Merge rule's defaults with the user's overrides under
|
|
229
|
+
``config["hotspot_taxonomy"]["<verdict>"]``. Per-verdict block keeps
|
|
230
|
+
name collisions safe across rule additions."""
|
|
231
|
+
base = dict(rule["thresholds"])
|
|
232
|
+
if config:
|
|
233
|
+
tax = config.get("hotspot_taxonomy", {}) or {}
|
|
234
|
+
# Per-verdict block (preferred, OCP-friendly): tax["<verdict>"]
|
|
235
|
+
per_verdict = tax.get(rule["verdict"], {})
|
|
236
|
+
if isinstance(per_verdict, dict):
|
|
237
|
+
base.update({k: float(v) for k, v in per_verdict.items()
|
|
238
|
+
if k in rule["thresholds"]})
|
|
239
|
+
return base
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
def _classify_hotspot_verdict(self_ratio: float, inc_pct: float, exc_pct: float,
|
|
243
|
+
calls: int, efficiency_ratio: float,
|
|
244
|
+
config: Optional[Dict[str, Any]] = None,
|
|
245
|
+
rules: Optional[List[HotspotRule]] = None) -> str:
|
|
246
|
+
"""Return the verdict for the given per-function metrics. Rules are
|
|
247
|
+
evaluated in ascending priority order; first match wins. CodeGreen
|
|
248
|
+
detects ``wrapper`` / ``TYPE_1_DIRECT`` / ``TYPE_2_INEFFICIENT`` /
|
|
249
|
+
``TYPE_5_FREQUENCY`` / ``minor``; ``TYPE_3_INDIRECT`` and
|
|
250
|
+
``TYPE_4_STRUCTURAL`` require callgraph analysis and are agent-side.
|
|
251
|
+
|
|
252
|
+
OCP: pass a custom ``rules`` list to extend without modifying this
|
|
253
|
+
function. config[hotspot_taxonomy][<verdict>] = {threshold: value}
|
|
254
|
+
overrides per-verdict thresholds without code change."""
|
|
255
|
+
metrics: HotspotMetrics = {
|
|
256
|
+
"self_ratio": self_ratio, "inc_pct": inc_pct, "exc_pct": exc_pct,
|
|
257
|
+
"calls": calls, "efficiency_ratio": efficiency_ratio,
|
|
258
|
+
}
|
|
259
|
+
active_rules = sorted(rules or _HOTSPOT_RULES, key=lambda r: r["priority"])
|
|
260
|
+
for rule in active_rules:
|
|
261
|
+
thresholds = _resolved_thresholds(rule, config)
|
|
262
|
+
try:
|
|
263
|
+
if rule["predicate"](metrics, thresholds):
|
|
264
|
+
return rule["verdict"]
|
|
265
|
+
except (KeyError, TypeError):
|
|
266
|
+
continue
|
|
267
|
+
return "minor"
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
# Backwards-compat: callers reading individual threshold values can still
|
|
271
|
+
# query a flat default map.
|
|
272
|
+
_DEFAULT_HOTSPOT_TAXONOMY = {
|
|
273
|
+
f"{r['verdict'].lower()}_{k}": v
|
|
274
|
+
for r in _HOTSPOT_RULES for k, v in r["thresholds"].items()
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
|
|
168
278
|
# ============================================================================
|
|
169
279
|
# Comprehensive Detection Functions for Init Command
|
|
170
280
|
# ============================================================================
|
|
@@ -2651,6 +2761,13 @@ def run_command(
|
|
|
2651
2761
|
cv = (e_stats.std / e_stats.mean * 100) if e_stats.mean > 0 else 0.0
|
|
2652
2762
|
avg_power = e_stats.mean / t_stats.mean if t_stats.mean > 0 else 0.0
|
|
2653
2763
|
|
|
2764
|
+
# Per-domain power: joules / mean wall time. Same time-base as the
|
|
2765
|
+
# scalar `power_watts` so the two are comparable (sum of domain powers
|
|
2766
|
+
# equals total power up to RAPL's overlapping-domain accounting).
|
|
2767
|
+
avg_domains_power = {}
|
|
2768
|
+
if avg_domains and t_stats.mean > 0:
|
|
2769
|
+
avg_domains_power = {d: j / t_stats.mean for d, j in avg_domains.items()}
|
|
2770
|
+
|
|
2654
2771
|
if json_output:
|
|
2655
2772
|
out = {
|
|
2656
2773
|
"command": command, "backend": backend.name,
|
|
@@ -2663,6 +2780,8 @@ def run_command(
|
|
|
2663
2780
|
}
|
|
2664
2781
|
if avg_domains:
|
|
2665
2782
|
out["domains"] = {d: round(j, 6) for d, j in sorted(avg_domains.items(), key=lambda x: -x[1])}
|
|
2783
|
+
out["domains_power_watts"] = {d: round(w, 4) for d, w in
|
|
2784
|
+
sorted(avg_domains_power.items(), key=lambda x: -x[1])}
|
|
2666
2785
|
print(json.dumps(out, indent=2))
|
|
2667
2786
|
if budget_exceeded:
|
|
2668
2787
|
raise typer.Exit(1)
|
|
@@ -3421,18 +3540,10 @@ def project_energy(
|
|
|
3421
3540
|
med_epc = median_epc[len(median_epc) // 2] if median_epc else 1
|
|
3422
3541
|
epc = data["inclusive_uj"] / calls if calls > 0 else 0
|
|
3423
3542
|
efficiency_ratio = epc / med_epc if med_epc > 0 else 0
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
elif exc_pct >= 10.0:
|
|
3429
|
-
verdict = "TYPE_1_DIRECT"
|
|
3430
|
-
elif calls > 100000 and exc_pct >= 3.0 and efficiency_ratio < 1.5:
|
|
3431
|
-
verdict = "TYPE_5_FREQUENCY"
|
|
3432
|
-
elif exc_pct >= 3.0:
|
|
3433
|
-
verdict = "TYPE_1_DIRECT"
|
|
3434
|
-
else:
|
|
3435
|
-
verdict = "minor"
|
|
3543
|
+
verdict = _classify_hotspot_verdict(
|
|
3544
|
+
self_ratio=self_ratio, inc_pct=inc_pct, exc_pct=exc_pct,
|
|
3545
|
+
calls=calls, efficiency_ratio=efficiency_ratio,
|
|
3546
|
+
config=load_config())
|
|
3436
3547
|
func_energy[name] = {
|
|
3437
3548
|
"energy_j": round(inc_j, 6),
|
|
3438
3549
|
"energy_pct": round(inc_pct, 2),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/aligned_indent.c
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/compound_lit.c
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/preproc_cond.c
RENAMED
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/preproc_func.c
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/nvim-treesitter/tests/indent/c/unfinished_comment.c
RENAMED
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/crates/cli/src/templates/PARSER_NAME.h
RENAMED
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/crates/cli/src/templates/py-binding.c
RENAMED
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/crates/generate/src/templates/alloc.h
RENAMED
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/crates/generate/src/templates/array.h
RENAMED
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/crates/tags/include/tree_sitter/tags.h
RENAMED
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter/lib/binding_web/lib/tree-sitter.c
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/bindings/c/tree_sitter/tree-sitter-c.h
RENAMED
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-c/bindings/swift/TreeSitterC/c.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-cpp/bindings/c/tree-sitter-cpp.h
RENAMED
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-cpp/bindings/swift/TreeSitterCPP/cpp.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-java/bindings/c/tree-sitter-java.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegreen-0.4.3 → codegreen-0.4.4}/third_party/tree-sitter-python/bindings/c/tree-sitter-python.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|