How to use the yappi.get_stats function in yappi

To help you get started, we’ve selected a few yappi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LSIR / gsn / gsn / tools / backlog / python3 / BackLogMain.py View on Github external
def print_stats():
        yappi.get_stats(yappi.SORTTYPE_TTOTAL)
        file = open(PROFILE_FILE,'a')
        for entry in yappi.get_stats(yappi.SORTTYPE_TAVG):
            file.write(entry+'\n')
        file.close()
github fnoble / Plot-o-matic / plot-o-matic.py View on Github external
vs = Variables()
viewers = Viewers(variables = vs)


iodl = IODriverList(variables = vs, viewers_instance = viewers)
proj = PlotOMatic(io_driver_list = iodl, variables = vs, viewers = viewers)

proj.start()
proj.configure_traits()
proj.stop()

if PROFILE:
  print "Generating Statistics"
  yappi.stop()
  stats = yappi.get_stats(yappi.SORTTYPE_TSUB, yappi.SORTORDER_DESCENDING, 300) #yappi.SHOW_ALL)
  for stat in stats: 
      print stat
github LSIR / gsn / gsn / tools / backlog / python3 / BackLogMain.py View on Github external
def print_stats():
        yappi.get_stats(yappi.SORTTYPE_TTOTAL)
        file = open(PROFILE_FILE,'a')
        for entry in yappi.get_stats(yappi.SORTTYPE_TAVG):
            file.write(entry+'\n')
        file.close()
github Tribler / tribler / Tribler / Main / dispersy.py View on Github external
rawserver.shutdown()
                session_done_flag.set()
                break
    callback.register(watchdog)
    callback.register(start)
    rawserver.listen_forever(None)
    callback.stop()

    if callback.exception:
        global exit_exception
        exit_exception = callback.exception

    if opt.yappi:
        yappi.stop()
        print "YAPPI:", yappi.clock_type()
        stats = yappi.get_stats(yappi.SORTTYPE_TSUB)
        for func_stats in stats.func_stats[:50]:
            print "YAPPI: %10dx  %10.3fs" % (func_stats.ncall, func_stats.tsub), func_stats.name