summaryrefslogtreecommitdiff
path: root/scripts/profiling
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-08-10 16:39:03 -0400
committerKali Kaneko <kali@leap.se>2015-08-11 15:22:23 -0400
commit8e9c810396b9b9f968234e3e21396814865ee22c (patch)
tree57cb3d34597db33daf9b1901c7cf09aceef7b235 /scripts/profiling
parentbec13f649e9262e1cf1d80825f2a19083fb0904a (diff)
[tests] add util function to instantiate dowser mem profiler
Diffstat (limited to 'scripts/profiling')
-rw-r--r--scripts/profiling/memdebug.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/profiling/memdebug.py b/scripts/profiling/memdebug.py
new file mode 100644
index 00000000..ed606331
--- /dev/null
+++ b/scripts/profiling/memdebug.py
@@ -0,0 +1,13 @@
+# memdebug.py
+
+import cherrypy
+import dowser
+
+
+def start(port):
+ cherrypy.tree.mount(dowser.Root())
+ cherrypy.config.update({
+ 'environment': 'embedded',
+ 'server.socket_port': port
+ })
+ cherrypy.engine.start()