Add docs for profiling execution

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      We need to add instructions and perhaps a justfile target for profiling memory usage in pymongo, using py-spy.

      Rough notes from working on HELP-72348:

      • Create an ubuntu spawn host
      • Use the pymongo scripts to set up the host
      • Install py-spy: https://github.com/benfred/py-spy
      • Create a test script that does a setup and then loops over the code to profile, to improve the sampling
      • Run the script using something like: py-spy record -o profile.svg --native -r 2000 - python test.py
      • Use scp to get the svg file back from the host

            Assignee:
            Noah Stapp
            Reporter:
            Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: