-
Notifications
You must be signed in to change notification settings - Fork 16
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
Incorrect result #48
Comments
Hello @eldar-mustafayev Thanks for reporting :) The plugin reports memory used in MB. Here are the results: bash $> sqlite3 .pymon
sqlite> select TOTAL_TIME, USER_TIME, KERNEL_TIME, MEM_USAGE, CPU_USAGE, ITEM, ITEM_PATH from TEST_METRICS where ITEM_PATH = 'pkg1.test_mb';
TOTAL_TIME|USER_TIME|KERNEL_TIME|MEM_USAGE|CPU_USAGE|ITEM|ITEM_PATH
0.00799322128295898|0.018202272|0.004366944|13.4453125|2.82354450115326|test_extension|pkg1.test_mb As you can see, your function consumes 13MB. This includes: namespaces, imports and datas. I let you close, unless I misunderstood your problem or something else lies beneath this issue :) |
Hi @js-dieu. Thanks for the reply. Actually it's quite interesting, because I am still getting a result lower than 1 MB. What do you think about that? What am I doing wrong?
|
Hello @eldar-mustafayev Something lies in your environment and yet ... it remains unexplained :) import numpy as np
np.show_config() Also, if you can make a strace of the pytest run (with only that test) it would be for sure usefull... |
Hello @js-dieu . Thanks for help, I printed logs you asked for. Hope, this will be helpful. :) Pytest trace:
Numpy configs:
|
Thanks for reporting @eldar-mustafayev However, I was refering to |
Sorry for late response. I hope this will help to identify the problem: |
The bug
In the function below the plugin calculated that memory usage is less than one MB. However, when I print the actual size of the array it is between 7 and 8 MB. I assume it is related to the
memory_profiler
, because I experienced similar result when using it.Desktop:
The text was updated successfully, but these errors were encountered: