You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hit this it profiling an application that uses sh to call the rhash command. Seems to be load dependent, long running commands are more likely to trigger it, the demo below triggers the problem 100% of the time. This is my first time using scalene.
$ cat sh_sleep.py ; scalene --cli ./sh_sleep.py 10
#!/usr/bin/env python
import sh # https://github.com/amoffat/sh
_command = sh.Command('/usr/bin/sleep')
_command = _command.bake(10)
_result = str(_command())
Error in program being profiled:
RAN: /usr/bin/sleep 10
STDOUT:
STDERR:
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/scalene/scalene_profiler.py", line 1631, in profile_code
exec(code, the_globals, the_locals)
File "./sh_sleep.py", line 7, in <module>
_result = str(_command())
File "/usr/lib/python3.10/site-packages/sh.py", line 1542, in __call__
return RunningCommand(cmd, call_args, stdin, stdout, stderr)
File "/usr/lib/python3.10/site-packages/sh.py", line 797, in __init__
self.wait()
File "/usr/lib/python3.10/site-packages/sh.py", line 854, in wait
self.handle_command_exit_code(exit_code)
File "/usr/lib/python3.10/site-packages/sh.py", line 878, in handle_command_exit_code
raise exc
sh.SignalException_SIGALRM:
RAN: /usr/bin/sleep 10
STDOUT:
STDERR:
Memory usage: ██ (max: 1.65MB, growth rate: 106%)
./sh_sleep.py: % of time = 0.00 out of 0.02.
╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷
│Time │–––––– │–––––– │Memory │–––––– │––––––––––– │Copy │
Line │Python │native │system │Python │peak │timeline/% │(MB/s) │./sh_sleep.py
╺━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━━┿━━━━━━━┿━━━━━━━━━━━━━━━┿━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
1 │ │ │ │ │ │ │ │#!/usr/bin/env python
2 │ │ │ │ │ │ │ │
3 │ │ │ │ │ │ │ │import sh # https://github.com/amoffat/sh
4 │ │ │ │ │ │ │ │
5 │ │ │ │ │ │ │ │_command = sh.Command('/usr/bin/sleep')
6 │ │ │ │ │ │ │ │_command = _command.bake(10)
7 │ │ │ │ │ │ │ │_result = str(_command())
8 │ │ │ │ │ │ │ │
╵ ╵ ╵ ╵ ╵ ╵ ╵ ╵
Top AVERAGE memory consumption, by line:
(1) 7: 2 MB
Top PEAK memory consumption, by line:
(1) 7: 2 MB
$ uname -a
Linux zbook 6.0.0-gentoo-x86_64 #1 SMP PREEMPT_DYNAMIC Thu Oct 6 15:04:38 MST 2022 x86_64 Intel(R) Core(TM) i7-4910MQ CPU @ 2.90GHz GenuineIntel GNU/Linux
$ $ python --version
Python 3.10.8
$ scalene --version
Scalene version 1.5.13
$ # I also tied git-latest:
$ pip install --user git+https://github.com/plasma-umass/scalene.git
$ # and got the same result
The text was updated successfully, but these errors were encountered:
I hit this it profiling an application that uses sh to call the rhash command. Seems to be load dependent, long running commands are more likely to trigger it, the demo below triggers the problem 100% of the time. This is my first time using scalene.
The text was updated successfully, but these errors were encountered: