parameters: (self)
return_statement: return json.dumps({
              "name": self.description,
              "session": self.profile_session,
              "create_date": datetime.datetime.now().strftime("%Y%m%d-%H%M%S"),
              "init_stack_trace": _format_stack(self.init_stack_trace),
              "duration": self.duration,
              "collectors": {collector.name: collector.entries for collector in self.collectors},
          }, indent=4)
docstring: Utility function to generate a json version of this profiler.
          This is useful to write profiling entries into a file, such as::
  
              with Profiler(db=None) as profiler:
                  do_stuff()
  
              filename = p.format_path('/home/foo/{desc}_{len}.json')
              with open(filename, 'w') as f:
                  f.write(profiler.json())
docstring_summary: Utility function to generate a json version of this profiler.
          This is useful to write profiling entries into a file, such as::
docstring_tokens: Utility function to generate a json version of this profiler . This is useful to write profiling entries into a file such as ::
function: def json(self):
          """
          Utility function to generate a json version of this profiler.
          This is useful to write profiling entries into a file, such as::
  
              with Profiler(db=None) as profiler:
                  do_stuff()
  
              filename = p.format_path('/home/foo/{desc}_{len}.json')
              with open(filename, 'w') as f:
                  f.write(profiler.json())
          """
          return json.dumps({
              "name": self.description,
              "session": self.profile_session,
              "create_date": datetime.datetime.now().strftime("%Y%m%d-%H%M%S"),
              "init_stack_trace": _format_stack(self.init_stack_trace),
              "duration": self.duration,
              "collectors": {collector.name: collector.entries for collector in self.collectors},
          }, indent=4)
function_tokens: def json ( self ) : return json . dumps ( { "name" : self . description , "session" : self . profile_session , "create_date" : datetime . datetime . now ( ) . strftime ( "%Y%m%d-%H%M%S" ) , "init_stack_trace" : _format_stack ( self . init_stack_trace ) , "duration" : self . duration , "collectors" : { collector . name : collector . entries for collector in self . collectors } , } , indent = 4 )