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

Track spikes, bugfixes, test execution, and enable osx #37

Merged
merged 20 commits into from
Jun 7, 2024

Conversation

asmacdo
Copy link
Member

@asmacdo asmacdo commented Jun 3, 2024

{output_prefix}usage.json now includes "totals".
{"183380": {"pcpu": 101.0, "pmem": 0.0, "rss": 11104, "vsz": 232924, "timestamp": "2024-06-04T10:26:59.614005-05:00"}, "totals": {"pmem": 0.0, "pcpu": 101.0}}

A run now looks like:

duct is executing ./test_script.py --duration 3 --memory-size 10000...
Log files will be written to .duct/logs/2024.06.04T10.42.58-185114_
this is of test of STDERR: ERRRRRRRRRRRRRRR
Test completed. Consumed 10000 MB for 3 seconds with CPU load factor 10000.

Exit Code: 0
Command: ./test_script.py --duration 3 --memory-size 10000
Log files location: .duct/logs/2024.06.04T10.42.58-185114_
Wall Clock Time: 8.781145811080933
Memory Peak Usage: 30.9%
CPU Peak Usage: 141.0%

with memory peak usage and cpu peak usage added, and number of pids and pid info now left out of the final report

Fixes: #22
Fixes: #39
Fixes: #36
Fixes: #6
Fixes: #15

@asmacdo asmacdo changed the title Next Track totals and add tests Jun 4, 2024
@asmacdo asmacdo marked this pull request as ready for review June 4, 2024 15:45
1. No need to wait on join() the monitoring thread, it is safely killed
   when duct process exits.
2. pass when ps fails (because inner process has finished)
3. Collect the first sample immediately rather than waiting for
   <sample-interval>

Fixes con#36
@asmacdo asmacdo changed the title Track totals and add tests Track spikes (and bugfixes) Jun 6, 2024
asmacdo added 5 commits June 6, 2024 12:39
Leaving out join() isn't ideal, the thread ends up in a race condition
with test cleanup

Related: con#36
A couple minor bugfixes were necessary:
 - close stderr, stdout if they are files (incl TailPipe)
 - subprocess.PIPE doesn't passthrough, thats None
@asmacdo
Copy link
Member Author

asmacdo commented Jun 6, 2024

Could be merged like this (it gets the job done) but test_execution probably should be refactored to be DRYer, ie use pytest parameters and a couple test utils. (Doing now)

@asmacdo asmacdo changed the title Track spikes (and bugfixes) Track spikes, bugfixes, test execution, and enable full matrix Jun 6, 2024
@asmacdo asmacdo changed the title Track spikes, bugfixes, test execution, and enable full matrix Track spikes, bugfixes, test execution, and enable osx Jun 6, 2024
@asmacdo asmacdo merged commit 8b1e218 into con:main Jun 7, 2024
21 checks passed
@asmacdo asmacdo deleted the next 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
2 participants