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

No memory profiling on windows (WSL or hyperv virtualization) #714

Open
farnyser opened this issue Oct 16, 2023 · 3 comments
Open

No memory profiling on windows (WSL or hyperv virtualization) #714

farnyser opened this issue Oct 16, 2023 · 3 comments

Comments

@farnyser
Copy link

Hi,

I can't make the memory profiling works on windows 11 neither using WSL not using a virtualized ubuntu distribution (through hyper-v)
I get Memory timeline: (max: 0.000 MB, growth: 0.0%) whatever the script I'm trying to run.

I'm using

  • Scalene version 1.5.31.1
  • Python 3.11.5

Any idea how to debug this ?
(Works fine on my personal linux computer, sadly I can't take company code there)

Thanks

@emeryberger
Copy link
Member

Can you provide some example code and the command line options you are using?

@farnyser
Copy link
Author

farnyser commented Oct 17, 2023

It doesn't look to be dependent on the executed code, but for example:
Command line: scalene --cli alloc_profiling.py

Code sample:

import numpy as np

if __name__ == "__main__":
    arr = np.random.random((10_000_000, 10))

On my laptop:

       ╷       ╷       ╷       ╷        ╷       ╷               ╷       ╷                                                                                                                                         
       │Time   │–––––– │–––––– │Memory  │–––––– │–––––––––––    │Copy   │                                                                                                                                         
  Line │Python │native │system │Python  │peak   │timeline/%     │(MB/s) │/home/farnyser/Coding/ng/alloc_profiling.py                                                                                                 
╺━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━━┿━━━━━━━┿━━━━━━━━━━━━━━━┿━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
     1 │    4% │   26% │   4%  │ 100%   │   10M │▁   1%         │    81 │import numpy as np                                                                                                                       
     2 │       │       │       │        │       │               │       │                                                                                                                                         
     3 │       │       │       │        │       │               │       │if __name__ == "__main__":                                                                                                               
     4 │       │   26% │  40%  │  22%   │  767M │█  99%         │       │    arr = np.random.random((10_000_000, 10))                                                                                             
     5 │       │       │       │        │       │               │       │                                                                                                                                         
       ╵       ╵       ╵       ╵        ╵       ╵               ╵       ╵                                                                                                                                         

On windows (WSL or Hyperv):

       │Time   │–––––– │–––––– │Memory  │–––––– │–––––––––––    │Copy   │                                                                                                                         
  Line │Python │native │system │Python  │peak   │timeline/%     │(MB/s) │/home/sfarny/shared-drives/C:/dev/python/alloc_profiling.py                                                                       
╺━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━━┿━━━━━━━┿━━━━━━━━━━━━━━━┿━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
     1 │    4% │   37% │       │        │       │               │       │import numpy as np                                                                                                       
     2 │       │       │       │        │       │               │       │                                                                                                                         
     3 │       │       │       │        │       │               │       │if __name__ == "__main__":                                                                                               
     4 │    1% │   52% │   7%  │        │       │               │       │    arr = np.random.random((10_000_000, 10))                                                                             
     5 │       │       │       │        │       │               │       │                                                                                                                         
       ╵       ╵       ╵       ╵        ╵       ╵               ╵       ╵            

@farnyser
Copy link
Author

@emeryberger Any idea what could be wrong ? How could I check on my side ?

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

No branches or pull requests

2 participants