17 lines
439 B
Python
17 lines
439 B
Python
from src.config.settings import cProfile, pstats
|
|
from src.sandpypi import main
|
|
|
|
if __name__ == "__main__":
|
|
# Profile the application
|
|
profiler = cProfile.Profile()
|
|
profiler.enable()
|
|
|
|
main()
|
|
|
|
profiler.disable()
|
|
# Write profiling results to file
|
|
with open('profile_results.log', 'w') as f:
|
|
stats = pstats.Stats(profiler, stream=f)
|
|
stats.sort_stats('cumulative')
|
|
stats.print_stats()
|