Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin/datastore-service
diff options
context:
space:
mode:
Diffstat (limited to 'bin/datastore-service')
-rwxr-xr-xbin/datastore-service19
1 files changed, 16 insertions, 3 deletions
diff --git a/bin/datastore-service b/bin/datastore-service
index c2a29fa..4186410 100755
--- a/bin/datastore-service
+++ b/bin/datastore-service
@@ -17,14 +17,14 @@ if not os.path.exists(repo_dir): os.makedirs(repo_dir)
log_dir = os.path.join(base_dir, "logs")
if not os.path.exists(log_dir): os.makedirs(log_dir)
-os.chdir(repo_dir)
+#os.chdir(repo_dir)
# setup logger
filename = None
if not sys.stdin.isatty():
filename = os.path.join(log_dir, "datastore.log")
-logging.basicConfig(level=logging.DEBUG,
+logging.basicConfig(level=logging.WARNING,
format="%(asctime)-15s %(levelname)s: %(message)s",
filename = filename,
)
@@ -85,9 +85,22 @@ def main():
logger.debug("Datastore shutdown with error",
exc_info=sys.exc_info())
-main()
+#main()
#import hotshot
#p = hotshot.Profile('hs.prof')
#p.run('main()')
+import cProfile
+import lsprofcalltree
+_prof = cProfile.Profile()
+_prof.enable()
+main()
+_prof.disable()
+k = lsprofcalltree.KCacheGrind(_prof)
+fp = open('/tmp/ds.kgrind', 'w+')
+k.output(fp)
+fp.close()
+
+
+