diff --git a/codeguru_profiler_agent/file_reporter/file_reporter.py b/codeguru_profiler_agent/file_reporter/file_reporter.py index d9c58c0..86a382b 100644 --- a/codeguru_profiler_agent/file_reporter/file_reporter.py +++ b/codeguru_profiler_agent/file_reporter/file_reporter.py @@ -35,7 +35,9 @@ def refresh_configuration(self): """ pass - def report(self, profile, agent_metadata=None, timestamp=datetime.datetime.now()): + def report(self, profile, agent_metadata=None, timestamp=None): + if timestamp is None: + timestamp = datetime.datetime.now() output_filename = self._output_filename_for(timestamp) logger.info("Writing profile to '{}'".format(output_filename))