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

Added macOS support #110

Merged
merged 3 commits into from
Jan 22, 2025
Merged

Added macOS support #110

merged 3 commits into from
Jan 22, 2025

Conversation

ArneTR
Copy link
Member

@ArneTR ArneTR commented Jan 22, 2025

Greptile Summary

Added macOS support to the eco-ci-energy-estimation project by implementing platform-specific CPU monitoring and system compatibility checks, while maintaining existing Linux functionality.

  • Added /scripts/cpu-utilization-macos.sh using iostat for macOS-specific CPU monitoring with nanosecond precision
  • Updated /scripts/setup.sh to dynamically select CPU monitoring script based on OS detection (uname)
  • Modified /scripts/vars.sh to handle missing /proc filesystem gracefully on non-Linux systems
  • Added macOS setup instructions in README.md requiring coreutils installation for microsecond timestamp support
  • Fixed path handling in /scripts/make_measurement.sh to properly handle spaces in filepaths

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 file(s) reviewed, 12 comment(s)
Edit PR Review Bot Settings | Greptile

scripts/cpu-utilization-macos.sh Show resolved Hide resolved
scripts/make_measurement.sh Outdated Show resolved Hide resolved
scripts/make_measurement.sh Show resolved Hide resolved
scripts/cpu-utilization-macos.sh Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
scripts/setup.sh Show resolved Hide resolved
scripts/setup.sh Show resolved Hide resolved
scripts/vars.sh Show resolved Hide resolved
scripts/vars.sh Outdated Show resolved Hide resolved
Copy link

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 8.40917 35.2655 2.54 13.89
No quotes allowed in labels 11.845 7.38683 2.71 2.73
(Soo this is something) echo SHELL 9.80333 10.1674 3.29 3.09
Environment setup (OS ubuntu-24.04, lint) 5.39333 8.93948 2.91 3.07
No quotes allowed in labels 5.16667 8.77181 2.85 3.08

🌳 CO2 Data:
City: Boydton, Lat: 36.6676, Lon: -78.3875
IP: 20.57.79.172
CO₂ from energy is: 0.018831510 g
CO₂ from manufacturing (embodied carbon) is: 0.003963009 g
Carbon Intensity for this location: 534 gCO₂eq/kWh
SCI: 0.022795 gCO₂eq / pipeline run emitted


Total cost of whole PR so far:

Copy link

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 4.81917 27.0316 1.88 14.40
No quotes allowed in labels 10.645 5.8936 2.01 2.93
(Soo this is something) echo SHELL 4.46333 7.65697 2.43 3.15
Environment setup (OS ubuntu-22.04, lint) 2.08 7.33682 2.37 3.09
No quotes allowed in labels 0.84 6.14422 1.99 3.09

🌳 CO2 Data:
City: Washington, Lat: 38.7095, Lon: -78.1539
IP: 20.55.46.205
CO₂ from energy is: 0.014434554 g
CO₂ from manufacturing (embodied carbon) is: 0.004108519 g
Carbon Intensity for this location: 534 gCO₂eq/kWh
SCI: 0.018543 gCO₂eq / pipeline run emitted


Total cost of whole PR so far:

Copy link

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run (incl. overhead) 8.03167 34.0021 2.34 14.54
No quotes allowed in labels 13.52 7.49348 2.50 3.00
(Soo this is something) echo SHELL 7.47667 9.32665 3.00 3.11
Environment setup (OS ubuntu-20.04, lint) 5.89 9.15718 2.97 3.08
No quotes allowed in labels 4.48 8.02482 2.61 3.08

🌳 CO2 Data:
City: Chicago, Lat: 41.8835, Lon: -87.6305
IP: 172.183.91.176
CO₂ from energy is: 0.018157068 g
CO₂ from manufacturing (embodied carbon) is: 0.004148463 g
Carbon Intensity for this location: 534 gCO₂eq/kWh
SCI: 0.022306 gCO₂eq / pipeline run emitted


Total cost of whole PR so far:

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

scripts/vars.sh Show resolved Hide resolved
@ArneTR ArneTR merged commit aa2bcde into main Jan 22, 2025
4 checks passed
@ArneTR ArneTR deleted the macOS branch January 22, 2025 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant