Skip to content

Commit 5423ebd

Browse files
authored
Merge pull request #10 from aws/file_reporter_bug_fix
Fix timestamp bug in file reporter
2 parents d275c23 + 925d99d commit 5423ebd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

codeguru_profiler_agent/file_reporter/file_reporter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ def refresh_configuration(self):
3535
"""
3636
pass
3737

38-
def report(self, profile, agent_metadata=None, timestamp=datetime.datetime.now()):
38+
def report(self, profile, agent_metadata=None, timestamp=None):
39+
if timestamp is None:
40+
timestamp = datetime.datetime.now()
3941
output_filename = self._output_filename_for(timestamp)
4042

4143
logger.info("Writing profile to '{}'".format(output_filename))

0 commit comments

Comments
 (0)