Skip to content

Commit

Permalink
Add Scalene profiler, sadly does not work because some issue, check s…
Browse files Browse the repository at this point in the history
…calene github issue plasma-umass/scalene#846
  • Loading branch information
Tomáš "Thebys" Biheler committed Aug 3, 2024
1 parent 54a7f09 commit 75f5a6b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@
"program": "${workspaceFolder}/main.py",
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "CrownPyBot Scalene Profiling Start",
"type": "python",
"request": "launch",
"module": "scalene",
"args": [
"--off-by-default",
"--profile-interval", "10",
"--no-mp",
"${workspaceFolder}/main.py"
],
"console": "integratedTerminal",
"justMyCode": false,
"pythonArgs": ["-Xfrozen_modules=off"]
}
]
}
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
import config
import multiprocessing
import MachineBrain
import scalene
from TelegramBot import CrownTelegramBot
from MachineBrain import MachineBrain
from events import EventQueue, EventTypes, Event
from Database import Database



def main():
"""Main entry point of the program. Imagine setup() and loop() in Arduino."""
if (config.DEVELOPMENT):
scalene.start()
logging.basicConfig(filename="CrownPiBot.log", level=logging.DEBUG)
logging.getLogger().addHandler(logging.StreamHandler())
logging.debug("PC - Setup started.")
Expand Down

0 comments on commit 75f5a6b

Please sign in to comment.