linkchecker/scripts/viewprof.py

20 lines
273 B
Python
Raw Normal View History

2014-03-27 11:27:40 +00:00
#!/usr/bin/env python
"""
View yappi profiling data.
Usage: $0 <filename>
"""
import sys
import yappi
2020-05-26 19:20:57 +00:00
2014-03-27 11:27:40 +00:00
def main(args):
filename = args[0]
stats = yappi.YFuncStats()
stats.add(filename)
stats.print_all()
2020-05-26 19:20:57 +00:00
if __name__ == "__main__":
main(sys.argv[1:])