1. Mikhail Korobov
  2. yappi

Commits

Mikhail Korobov  committed f7230c5

make 'start' function description docstring

  • Participants
  • Parent commits 03fda3d
  • Branches default

Comments (0)

Files changed (1)

File yappi.py

View file
 def __callback(frame, event, arg):
     _yappi.profile_event(frame, event, arg)
     return __callback
-'''
-...
-Args:
-builtins: If set true, then builtin functions are profiled too.
-timing_sample: will cause the profiler to do timing measuresements
-               according to the value. Will increase profiler speed but
-               decrease accuracy.
-'''
+
 def start(builtins = False, timing_sample=1):
+    '''
+    Args:
+    builtins: If set true, then builtin functions are profiled too.
+    timing_sample: will cause the profiler to do timing measuresements
+                   according to the value. Will increase profiler speed but
+                   decrease accuracy.
+    '''
     threading.setprofile(__callback)
     _yappi.start(builtins, timing_sample)
 
     parser.allow_interspersed_args = False
     parser.add_option("-b", "--builtins",
                   action="store_true", dest="profile_builtins", default=False,
-                  help="Profiles builtin functions when set. [default: False]") 
+                  help="Profiles builtin functions when set. [default: False]")
     parser.add_option("-s", "--sample",
                   type="int", dest="timing_sample", default=1,
                   help="Profiles functions every sample call. [default: 1]")
     else:
         parser.print_usage()
     return parser
-    
+
 if __name__ == "__main__":
     main()