Example #1
0
    def onSyncDone(sync_result, sl, t0, plop_collector, theseus):
        # TODO should write this to a result file
        print "GOT SYNC RESULT: ", sync_result
        t1 = datetime.now()
        if sl:
            sl.stop()
        if plop_collector:
            from plop.collector import PlopFormatter
            formatter = PlopFormatter()
            plop_collector.stop()
            if not os.path.isdir('profiles'):
                os.mkdir('profiles')
            with open('profiles/plop-sync-%s' % GITVER, 'w') as f:
                f.write(formatter.format(plop_collector))
        if theseus:
            with open('callgrind.theseus', 'wb') as outfile:
                theseus.write_data(outfile)
            theseus.uninstall()

        delta = (t1 - t0).total_seconds()
        # TODO should write this to a result file
        print "[+] Sync took %s seconds." % delta
        reactor.stop()

        if args.do_plot:
            from plot import plot
            plot(args.logfile)
Example #2
0
    def onSyncDone(sync_result, sl, t0, plop_collector, theseus):
        # TODO should write this to a result file
        print "GOT SYNC RESULT: ", sync_result
        t1 = datetime.now()
        if sl:
            sl.stop()
        if plop_collector:
            from plop.collector import PlopFormatter
            formatter = PlopFormatter()
            plop_collector.stop()
            if not os.path.isdir('profiles'):
                os.mkdir('profiles')
            with open('profiles/plop-sync-%s' % GITVER, 'w') as f:
                f.write(formatter.format(plop_collector))
        if theseus:
            with open('callgrind.theseus', 'wb') as outfile:
                theseus.write_data(outfile)
            theseus.uninstall()

        delta = (t1 - t0).total_seconds()
        # TODO should write this to a result file
        print "[+] Sync took %s seconds." % delta
        reactor.stop()

        if args.do_plot:
            from plot import plot
            plot(args.logfile)
Example #3
0
 def finish_profile(self):
     self.collector.stop()
     formatter = PlopFormatter()
     self.finish(formatter.format(self.collector))
Example #4
0
 def finish_profile(self):
     self.collector.stop()
     formatter = PlopFormatter()
     self.finish(formatter.format(self.collector))
Example #5
0
 async def finish_profile(self):
     time.sleep(1)
     self.collector.stop()
     formatter = PlopFormatter()
     self.finish(formatter.format(self.collector))