aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/rpkid.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2012-07-26 13:45:17 +0000
committerRob Austein <sra@hactrn.net>2012-07-26 13:45:17 +0000
commit06bedea032594f3eae92f3502dfe76195108d19a (patch)
tree5ef3db90d8c93a627400bfb56f116cff1938c319 /rpkid/rpki/rpkid.py
parent232f670a7a8109f4a29356ed98aaa7e23a082bb8 (diff)
Add profiling support to yamltest; fix profiling support in daemons.
Tweak yamltest to force one ROA request per prefix regardless of how the user expressed it; we may want to revisit this eventually, but it's more useful this way for now. svn path=/trunk/; revision=4609
Diffstat (limited to 'rpkid/rpki/rpkid.py')
-rw-r--r--rpkid/rpki/rpkid.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/rpkid/rpki/rpkid.py b/rpkid/rpki/rpkid.py
index 8c275688..b923b1a3 100644
--- a/rpkid/rpki/rpkid.py
+++ b/rpkid/rpki/rpkid.py
@@ -102,7 +102,12 @@ class main(object):
if self.profile:
import cProfile
- cProfile.run("self.main()", self.profile)
+ prof = cProfile.Profile()
+ try:
+ prof.runcall(self.main)
+ finally:
+ prof.dump_stats(self.profile)
+ rpki.log.info("Dumped profile data to %s" % self.profile)
else:
self.main()