Skip to content

Commit 0d39944

Browse files
author
Colman Yau
committed
Allow profile start time equals end time
As we are using the last sample time as end time, there is chance we have the start time equals to end time.
1 parent 0a42f1d commit 0d39944

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codeguru_profiler_agent/model/profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ def end(self):
4343
@end.setter
4444
def end(self, value):
4545
self._validate_positive_number(value)
46-
if value <= self.start:
46+
if value < self.start:
4747
raise ValueError(
48-
"Profile end value must be bigger than {}, got {}".format(self.start, value))
48+
"Profile end value must be greater than or equals to {}, got {}".format(self.start, value))
4949
self._end = value
5050
# this is the total cpu time spent in this application since start, not just the overhead
5151
self.cpu_time_seconds = time.process_time() - self._start_process_time

0 commit comments

Comments
 (0)