We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Incorrect time or % times are reported when scalene is run with --profile-only
--profile-only
To Reproduce Implement the following two modules:
# main_module.py import time from other_module import sleep_one_second if __name__=="__main__": time.sleep(1.0) sleep_one_second()
# other_module.py import time def sleep_one_second(): time.sleep(1.0)
Run scalene --profile-only other_module.py main_module.py
scalene --profile-only other_module.py main_module.py
Expected behavior Either:
other_module.py
Actual behaviour
Memory usage: (max: 0.00MB, growth rate: 0%) .../other_module.py: % of time = 100.00% out of 2.00s. ╷ ╷ ╷ ╷ ╷ ╷ ╷ ╷ Line │Time │–––––– │–––––– │Memory │–––––– │––––––––––– │Copy │ │Python │native │system │Python │net │timeline/% │(MB/s) │.../other_module.py ╺━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━━┿━━━━━━━┿━━━━━━━━━━━━━━━┿━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ 1 │ │ │ │ │ │ │ │import time 2 │ │ │ │ │ │ │ │ 3 │ │ │ │ │ │ │ │ 4 │ │ │ │ │ │ │ │def sleep_one_second(): 5 │ 1% │ │ 99% │ │ │ │ │ time.sleep(1.0) 6 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╶──────┼───────┼───────┼───────┼────────┼───────┼───────────────┼───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────╴ │ │ │ │ │ │ │ │function summary for .../other_module.py 4 │ 1% │ │ 99% │ │ │ │ │sleep_one_second ╵ ╵ ╵ ╵ ╵ ╵ ╵ ╵
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
acefe67
Thanks for the bug report! This has been fixed in the repository version, which will soon be made a new release.
Sorry, something went wrong.
emeryberger
jaltmayerpizzorno
sternj
No branches or pull requests
Describe the bug
Incorrect time or % times are reported when scalene is run with
--profile-only
To Reproduce
Implement the following two modules:
Run
scalene --profile-only other_module.py main_module.py
Expected behavior
Either:
other_module.py
is reported as taking 50% of 2.00sother_module.py
is reported as taking 100% of 1.00sActual behaviour
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: