diff options
author | Rob Austein <sra@hactrn.net> | 2012-07-26 13:45:17 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2012-07-26 13:45:17 +0000 |
commit | 06bedea032594f3eae92f3502dfe76195108d19a (patch) | |
tree | 5ef3db90d8c93a627400bfb56f116cff1938c319 /rpkid/rpki/irdbd.py | |
parent | 232f670a7a8109f4a29356ed98aaa7e23a082bb8 (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/irdbd.py')
-rw-r--r-- | rpkid/rpki/irdbd.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rpkid/rpki/irdbd.py b/rpkid/rpki/irdbd.py index 60f6a549..a0fc0ec1 100644 --- a/rpkid/rpki/irdbd.py +++ b/rpkid/rpki/irdbd.py @@ -174,7 +174,12 @@ class main(object): if profile: import cProfile - cProfile.run("self.main()", profile) + prof = cProfile.Profile() + try: + prof.runcall(self.main) + finally: + prof.dump_stats(profile) + rpki.log.info("Dumped profile data to %s" % profile) else: self.main() |