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

Collect more stats #104

Merged
merged 15 commits into from
Jun 21, 2024
Merged

Collect more stats #104

merged 15 commits into from
Jun 21, 2024

Conversation

asmacdo
Copy link
Member

@asmacdo asmacdo commented Jun 19, 2024

  • Collects average usages
  • reports absolute values for memory
  • reports number of datapoints (reports)
  • reports number of samples

Fixes: #63
Fixes: #41

$ duct --s-i 1 --r-i 2 -p ZZZZ_  --clobber ./test/data/test_script.py --duration 10 --memory-size 1000
duct is executing ./test/data/test_script.py --duration 10 --memory-size 1000...
Log files will be written to ZZZZ_
this is of test of STDERR
this is of test of STDOUT
Test completed. Consumed 1000 MB for 10 seconds with CPU load factor 10000.

Exit Code: 0
Command: ./test/data/test_script.py --duration 10 --memory-size 1000
Log files location: ZZZZ_
Wall Clock Time: 10.366 sec
Memory Peak Usage (RSS): 1036000 KiB
Memory Average Usage (RSS): 1036000.000 KiB
Virtual Memory Peak Usage (VSZ): 1258432 KiB
Virtual Memory Average Usage (VSZ): 1258432.000 KiB
Memory Peak Percentage: 3.1%
Memory Average Percentage: 3.100%
CPU Peak Usage: 100.0%
Average CPU Usage: 99.780%
Samples Collected: 10
Reports Written: 6

Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 98.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.90%. Comparing base (eb1237c) to head (97ea981).
Report is 2 commits behind head on main.

Files Patch % Lines
src/duct/__main__.py 98.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #104      +/-   ##
==========================================
+ Coverage   92.47%   93.90%   +1.42%     
==========================================
  Files           2        2              
  Lines         319      361      +42     
  Branches       50       55       +5     
==========================================
+ Hits          295      339      +44     
+ Misses         18       16       -2     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asmacdo
Copy link
Member Author

asmacdo commented Jun 20, 2024

The print statements have gotten to be quite messy, and this PR makes it worse, but I'll refactor that in #64

@asmacdo asmacdo marked this pull request as ready for review June 20, 2024 20:19
@asmacdo asmacdo requested a review from jwodder June 20, 2024 20:19
I was hoping exlcude_metadata would leave it out of asdict() but it did
not. On further reflection, I figure its actually good to report the
number of samples.
Co-authored-by: John T. Wodder II <[email protected]>
@asmacdo
Copy link
Member Author

asmacdo commented Jun 20, 2024

@jwodder do you want another look are am I good to merge?

@asmacdo asmacdo merged commit 3ea9f9f into con:main Jun 21, 2024
30 checks passed
@asmacdo asmacdo deleted the more-stats branch August 22, 2024 15:04
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.

report "Memory Peak Usage" in absolute value not in "%" Track Average CPU and Mem usage
2 participants