Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST!!!! DO NOT MERGE #251

Closed
wants to merge 124 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
ab45de7
Added measuring energy of a whole py file
Nov 2, 2024
2a48d81
code [POC] Added new energy_meter.py class, added sample inefficent p…
Nov 2, 2024
4ca968b
code [POC] fixed detecting the code smells
Nov 3, 2024
e9a6765
code [POC] fixed pylint analyzer
Nov 3, 2024
9901efc
code [POC] fixed pylint analyzer
Nov 3, 2024
116374c
code [POC] added an entrypoint to main
Nov 3, 2024
51f8fbf
code [POC] added stricter class definitions
Nov 3, 2024
cc5142d
Added placeholder code for long element chain refactorer
Ayushi1972 Nov 5, 2024
856f482
Added placeholder code for long scope chaining refactorer
Ayushi1972 Nov 5, 2024
45b9fb5
fixed path issue in pylint analyzer
Sevhena Nov 5, 2024
2549b80
code carbon test
Nov 6, 2024
9d11710
code carbon meter added
Nov 6, 2024
92a337e
added ternary condition smell init changes
Sevhena Nov 6, 2024
6a4a0a4
Merge branch 'poc' of https://github.com/ssm-lab/capstone--source-cod…
Sevhena Nov 6, 2024
09d19ff
Added multiple runs for code carbon
Ayushi1972 Nov 6, 2024
4e8e6f7
Paths partiall fixed
Nov 6, 2024
bd9656f
made path fixes
Sevhena Nov 6, 2024
0e512d2
Merge branch 'poc' of https://github.com/ssm-lab/capstone--source-cod…
Sevhena Nov 6, 2024
dcd3ad0
Fixed code carbon
Nov 6, 2024
0447286
Merge branch 'poc' of https://github.com/Sevhena/capstone--source-cod…
Nov 6, 2024
7b4f4fd
code carbon fixed
Nov 6, 2024
4019991
add output folder
Sevhena Nov 6, 2024
d8924a0
Merge branch 'poc' of https://github.com/ssm-lab/capstone--source-cod…
Sevhena Nov 6, 2024
45788c5
Fixed refactorer classes to include inhertance
Ayushi1972 Nov 6, 2024
2ac7080
Merge branch 'poc' of https://github.com/ssm-lab/capstone--source-cod…
Sevhena Nov 6, 2024
e05b3d5
added custom energy measure logic for apple silicon chips(other platf…
tbrar06 Nov 6, 2024
561b88f
allow run from main
Sevhena Nov 6, 2024
3925bcd
Merge branch 'poc' of https://github.com/ssm-lab/capstone--source-cod…
Sevhena Nov 6, 2024
495d453
Revised POC - started adding base structure
nivethakuruparan Nov 7, 2024
65fb622
Revised POC - Added base_analyzer.py
nivethakuruparan Nov 7, 2024
df6bff5
Revised POC - Added pylint_analyzer.py + utils folder with configuration
nivethakuruparan Nov 7, 2024
2b7cad1
Revised POC - Added ternary_expression_analyzer.py
nivethakuruparan Nov 7, 2024
64222ce
Revised POC - Added main.py for analyzer package
nivethakuruparan Nov 7, 2024
6d06200
Revised POC - Added tests folder for src1
nivethakuruparan Nov 7, 2024
92c2754
Revised POC - Ran analyzer.main and created output files
nivethakuruparan Nov 7, 2024
7cc27a6
created detection for long ternary expressions
Sevhena Nov 7, 2024
35556e1
Refactored src folder
Sevhena Nov 7, 2024
583db48
Revised POC - Modifed tests in src1-tests
nivethakuruparan Nov 8, 2024
c8f09f6
Revised POC - Readded base structure for src1
nivethakuruparan Nov 8, 2024
1a87160
Revised POC - Added base_analyzer.py
nivethakuruparan Nov 8, 2024
5c19918
Revised POC - Added pylint_analyzer.py
nivethakuruparan Nov 8, 2024
9db267f
Revised POC - Added ternary_expression_pylint_analyzer.py
nivethakuruparan Nov 8, 2024
dd88936
Revised POC - Added base_energy_meter.py
nivethakuruparan Nov 8, 2024
57f1331
Revised POC - Added codecarbon_energy_meter.py
nivethakuruparan Nov 8, 2024
8ac1d60
Revised POC - Added base_refactorer.py
nivethakuruparan Nov 8, 2024
9792b7d
Revised POC - Added use_a_generator_refactor.py
nivethakuruparan Nov 8, 2024
c1474af
Revised POC - Added analyzers_config.py
nivethakuruparan Nov 8, 2024
e59185f
Revised POC - Added ast_parser.py
nivethakuruparan Nov 8, 2024
62be7c2
Revised POC - Added logger.py
nivethakuruparan Nov 8, 2024
4a487fd
Revised POC - Added outputs_config.py
nivethakuruparan Nov 8, 2024
0ff8dc1
Revised POC - Added refactorer_factory.py
nivethakuruparan Nov 8, 2024
488cb73
Revised POC - Added main.py
nivethakuruparan Nov 8, 2024
73e968e
Revised POC - Added output files
nivethakuruparan Nov 8, 2024
6c69f16
Fixed errors when running code carbon for nivs work
Ayushi1972 Nov 8, 2024
6c94f26
Changed refactoring base class
Nov 9, 2024
61a517c
made restructuring changes
Sevhena Nov 9, 2024
30b741f
Merge branch 'poc' of https://github.com/ssm-lab/capstone--source-cod…
Sevhena Nov 9, 2024
58dfa9b
Added long message chain custom analyzer:
Nov 9, 2024
8835302
delete old src folder
Sevhena Nov 9, 2024
b759d4e
added refactoring class for unused imports
Ayushi1972 Nov 9, 2024
13c87d8
Added to test case for unused imports
Ayushi1972 Nov 9, 2024
6352bbe
fixed silly things
Ayushi1972 Nov 9, 2024
db87805
update on output files from last run
Ayushi1972 Nov 9, 2024
bb6aa0b
Merge branch 'poc' of https://github.com/ssm-lab/capstone--source-cod…
Sevhena Nov 9, 2024
5817ce5
fixed refactorer
Sevhena Nov 10, 2024
3ac2ae6
#239: Implemented Member Ignoring Method Refactoring
Sevhena Nov 10, 2024
795e526
Added framework for long parameter list refactoring
tbrar06 Nov 10, 2024
d466527
Added refactoring logic for long param list code smell(pending catego…
tbrar06 Nov 10, 2024
6282d2d
Added long param list function example
tbrar06 Nov 10, 2024
4bc6705
Refactorer Code standardarization: refactorer naming, PyLint line num…
tbrar06 Nov 10, 2024
0e9bb17
Added parameter grouping for Long Parameter List refactoring. Updated…
tbrar06 Nov 10, 2024
14169c3
added correct success message to long param list refactor
Sevhena Nov 10, 2024
b04614b
renamed and added refactor for unused variables and class attributes
Ayushi1972 Nov 10, 2024
55b8c4b
fixed silly issues and added to test case
Ayushi1972 Nov 10, 2024
628dc2f
returned test case file to before
Ayushi1972 Nov 10, 2024
5ef01b7
made config changes
Sevhena Nov 10, 2024
8c3c0a3
added test case for unused imports, variables, and class attributes
Ayushi1972 Nov 10, 2024
966f45e
Merge branch 'poc' of https://github.com/ssm-lab/capstone--source-cod…
Ayushi1972 Nov 10, 2024
955aacc
changed deleting to replace with empty line
Ayushi1972 Nov 10, 2024
410388b
Long message chain refactorer done
Nov 11, 2024
9f9f00c
Merge branch 'poc' of https://github.com/Sevhena/capstone--source-cod…
Nov 11, 2024
d70725f
added copy of input test file
Sevhena Nov 11, 2024
9c46dc6
fixed lmc refactorer
Sevhena Nov 11, 2024
deae825
added tests for example 2
Nov 11, 2024
2adabea
Merge branch 'poc' of https://github.com/Sevhena/capstone--source-cod…
Nov 11, 2024
bc78f6c
testing
Nov 11, 2024
4fdcfb3
Changed ending message
nivethakuruparan Nov 11, 2024
96a9654
Added custom pylint smell for unused vars
Ayushi1972 Nov 11, 2024
96b406b
Merge branch 'poc' of https://github.com/ssm-lab/capstone--source-cod…
Ayushi1972 Nov 11, 2024
182b910
fixed test copy for my test cases
Ayushi1972 Nov 11, 2024
7a0d4fd
updated custom smell for unused vars to include unused class attributes
Ayushi1972 Nov 11, 2024
49e1831
fixed small bug for unused attribute refactorer
Ayushi1972 Nov 11, 2024
2c28c44
added functionality testing + implement isolated refactorings
Sevhena Nov 11, 2024
b187e7f
Merge branch 'poc' of https://github.com/ssm-lab/capstone--source-cod…
Sevhena Nov 11, 2024
e7515cb
fixed long param list refactor
Sevhena Nov 11, 2024
be289b3
minor fixes for source testing
Sevhena Nov 11, 2024
413884f
made final restructuring changes
Sevhena Nov 11, 2024
3e69236
updated paths and imports
Sevhena Nov 11, 2024
6e6caa1
#249 : Add test for MIM analysis
Sevhena Nov 11, 2024
a598b12
#249 : Add test for LMC analysis
Sevhena Nov 11, 2024
bebeb2a
add analyzer test utility function
Sevhena Nov 11, 2024
45c9464
made typing fixes + changed JSON reporter type
Sevhena Nov 12, 2024
ef032e5
fixed bug in analyzer
Sevhena Nov 12, 2024
66b4932
Merge branch 'dev' into poc
Sevhena Nov 12, 2024
110da51
Merge branch 'dev' into poc
Sevhena Nov 12, 2024
61af376
added testing directories
Sevhena Nov 12, 2024
a6386ee
Merge branch 'dev' into poc
Sevhena Nov 12, 2024
8069814
added placeholder tests to simulate passing
Sevhena Nov 12, 2024
ddd69bb
Merge branch 'poc' of https://github.com/ssm-lab/capstone--source-cod…
Sevhena Nov 12, 2024
b1d3476
Merge branch 'dev' into poc
Sevhena Nov 12, 2024
263c7cf
Merge branch 'dev' into poc
Sevhena Nov 12, 2024
1e0e56d
renamed test files for clarity
Sevhena Nov 18, 2024
0175b32
Merge branch 'poc' of https://github.com/ssm-lab/capstone--source-cod…
Sevhena Nov 18, 2024
238d594
created ruff pre-commit (#254)
Sevhena Nov 25, 2024
b7c151b
changed pre-commit ruff config to run formatter first (#254)
Sevhena Nov 25, 2024
8b40e96
Merge branch 'dev' of https://github.com/ssm-lab/capstone--source-cod…
Sevhena Nov 25, 2024
8c10c8d
Merge branch 'dev' of https://github.com/ssm-lab/capstone--source-cod…
Sevhena Nov 25, 2024
0cf7f41
Merge branch 'dev' into poc
Sevhena Nov 25, 2024
6333031
Merge branch 'dev' into poc
Sevhena Nov 25, 2024
c07cdd8
Merge branch 'dev' into poc
Sevhena Nov 25, 2024
0fe2906
Merge branch 'dev' into poc
Sevhena Nov 25, 2024
221b96c
Merge branch 'dev' into poc
Sevhena Nov 25, 2024
cc99cde
add pytest-cov dependency to .toml
Sevhena Nov 25, 2024
12d1d97
Merge branch 'dev' into poc
Sevhena Nov 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,23 @@ TSWLatexianTemp*

# DRAW.IO files
*.drawio
*.drawio.bkp
*.drawio.bkp

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

.venv/

# Rope
.ropeproject

*.egg-info/

# Package files
src/ecooptimizer/outputs/
build/
tests/temp_dir/

# Coverage
.coverage
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.4
hooks:
# Run the formatter.
- id: ruff-format
# Run the linter.
- id: ruff

31 changes: 31 additions & 0 deletions intel_power_gadget_log.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
System Time,RDTSC,Elapsed Time (sec), CPU Utilization(%),CPU Frequency_0(MHz),Processor Power_0(Watt),Cumulative Processor Energy_0(Joules),Cumulative Processor Energy_0(mWh),IA Power_0(Watt),Cumulative IA Energy_0(Joules),Cumulative IA Energy_0(mWh),Package Temperature_0(C),Package Hot_0,DRAM Power_0(Watt),Cumulative DRAM Energy_0(Joules),Cumulative DRAM Energy_0(mWh),GT Power_0(Watt),Cumulative GT Energy_0(Joules),Cumulative GT Energy_0(mWh),Package PL1_0(Watt),Package PL2_0(Watt),Package PL4_0(Watt),Platform PsysPL1_0(Watt),Platform PsysPL2_0(Watt),GT Frequency(MHz),GT Utilization(%)
02:50:20:527, 291193296011688, 0.108, 11.000, 4200, 33.104, 3.559, 0.989, 27.944, 3.004, 0.834, 76, 0, 1.413, 0.152, 0.042, 0.064, 0.007, 0.002, 107.000, 107.000, 163.000, 0.000, 0.000, 773, 13.086
02:50:20:635, 291193576924645, 0.216, 9.000, 800, 24.641, 6.229, 1.730, 19.881, 5.159, 1.433, 67, 0, 1.125, 0.274, 0.076, 0.023, 0.009, 0.003, 107.000, 107.000, 163.000, 0.000, 0.000, 7, 0.000
02:50:20:744, 291193860019214, 0.325, 4.000, 800, 11.792, 7.517, 2.088, 7.184, 5.943, 1.651, 64, 0, 0.684, 0.348, 0.097, 0.048, 0.015, 0.004, 107.000, 107.000, 163.000, 0.000, 0.000, 16, 0.000
02:50:20:853, 291194141601618, 0.434, 6.000, 800, 10.289, 8.635, 2.399, 5.716, 6.564, 1.823, 62, 0, 0.727, 0.427, 0.119, 0.033, 0.018, 0.005, 107.000, 107.000, 163.000, 0.000, 0.000, 12, 0.000
02:50:20:961, 291194421832739, 0.542, 7.000, 4300, 14.041, 10.153, 2.820, 9.482, 7.589, 2.108, 64, 0, 0.777, 0.511, 0.142, 0.034, 0.022, 0.006, 107.000, 107.000, 163.000, 0.000, 0.000, 12, 0.000
02:50:21:068, 291194700236744, 0.649, 5.000, 4300, 11.539, 11.392, 3.165, 6.964, 8.337, 2.316, 62, 0, 0.733, 0.590, 0.164, 0.025, 0.025, 0.007, 107.000, 107.000, 163.000, 0.000, 0.000, 7, 0.000
02:50:21:178, 291194985171256, 0.759, 6.000, 4300, 8.379, 12.313, 3.420, 3.835, 8.759, 2.433, 60, 0, 0.722, 0.670, 0.186, 0.013, 0.026, 0.007, 107.000, 107.000, 163.000, 0.000, 0.000, 7, 0.000
02:50:21:288, 291195268975634, 0.869, 6.000, 800, 12.457, 13.677, 3.799, 7.888, 9.623, 2.673, 61, 0, 0.804, 0.758, 0.210, 0.018, 0.028, 0.008, 107.000, 107.000, 163.000, 0.000, 0.000, 7, 0.000
02:50:21:397, 291195551604850, 0.978, 4.000, 3600, 9.805, 14.747, 4.096, 5.285, 10.199, 2.833, 60, 0, 0.696, 0.833, 0.232, 0.032, 0.031, 0.009, 107.000, 107.000, 163.000, 0.000, 0.000, 12, 0.000
02:50:21:506, 291195833298384, 1.086, 15.000, 4200, 24.585, 17.418, 4.838, 20.089, 12.382, 3.439, 76, 0, 1.245, 0.969, 0.269, 0.025, 0.034, 0.009, 107.000, 107.000, 163.000, 0.000, 0.000, 7, 0.000
02:50:21:515, 291195856417502, 1.095, 58.000, 4300, 48.989, 17.855, 4.960, 43.302, 12.768, 3.547, 78, 0, 1.225, 0.980, 0.272, 0.164, 0.036, 0.010, 107.000, 107.000, 163.000, 0.000, 0.000, 2, 0.000

Total Elapsed Time (sec) = 1.095316
Measured RDTSC Frequency (GHz) = 2.592

Cumulative Processor Energy_0 (Joules) = 17.855347
Cumulative Processor Energy_0 (mWh) = 4.959819
Average Processor Power_0 (Watt) = 16.301554

Cumulative IA Energy_0 (Joules) = 12.768311
Cumulative IA Energy_0 (mWh) = 3.546753
Average IA Power_0 (Watt) = 11.657197

Cumulative DRAM Energy_0 (Joules) = 0.979736
Cumulative DRAM Energy_0 (mWh) = 0.272149
Average DRAM Power_0 (Watt) = 0.894479

Cumulative GT Energy_0 (Joules) = 0.035645
Cumulative GT Energy_0 (mWh) = 0.009901
Average GT Power_0 (Watt) = 0.032543
12 changes: 12 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[mypy]
files = test, src/**/*.py

disallow_any_generics = True
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
disallow_untyped_decorators = True
no_implicit_optional = True
warn_redundant_casts = True
implicit_reexport = False
strict_equality = True
Loading
Loading