Added script for plotting profiling data

This commit is contained in:
Veronica K. B. Olsen
2019-11-16 12:09:51 +01:00
parent 653c7bbe80
commit dde8102cc5
2 changed files with 17 additions and 0 deletions
+1
View File
@@ -23,6 +23,7 @@ sample/**/*.json
tests/temp
.pytest_cache
pytestdebug.log
prof/
# Coverage
.coverage
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pstats
from os import path
profDir = path.abspath(path.join(path.dirname(__file__),"..","prof"))
print("")
print("Profiles directory: %s" % profDir)
print("")
profMainWindows = pstats.Stats(path.join(profDir,"testMainWindows.prof"))
profMainWindows.sort_stats("cumtime")
profMainWindows.print_stats("nw",50)