Skip to content

Commit 491e0e7

Browse files
authored
Merge pull request #29 from aws/gimki-patch-1
Log sampling interval and profile active second
2 parents fac3bd6 + 6c353b7 commit 491e0e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

codeguru_profiler_agent/profiler_disabler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def is_overall_cpu_usage_limit_reached(self, profile=None):
5858

5959
if used_time_percentage >= cpu_limit_percentage:
6060
logger.debug(self.timer.metrics)
61+
logger.debug("Profile active seconds since start: {:.2f} s".format(profile.get_active_millis_since_start()/1000))
6162
logger.info(
6263
"Profiler overall cpu usage limit reached: {:.2f} % (limit: {:.2f} %), will stop CodeGuru Profiler."
6364
.format(used_time_percentage, cpu_limit_percentage))
@@ -78,6 +79,7 @@ def is_sampling_cpu_usage_limit_reached(self, profile=None):
7879

7980
if used_time_percentage >= cpu_limit_percentage:
8081
logger.debug(self.timer.metrics)
82+
logger.debug("Sampling interval seconds: {:.2f} s".format(sampling_interval_seconds))
8183
logger.info(
8284
"Profiler sampling cpu usage limit reached: {:.2f} % (limit: {:.2f} %), will stop CodeGuru Profiler."
8385
.format(used_time_percentage, cpu_limit_percentage))

0 commit comments

Comments
 (0)