Skip to content

Commit b32bf14

Browse files
committed
call graph filtering
1 parent c87a469 commit b32bf14

5 files changed

Lines changed: 7 additions & 2 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name = 'stackimpact',
5-
version = '1.0.3',
5+
version = '1.0.4',
66
description = 'StackImpact Python Agent',
77
author = 'StackImpact',
88
author_email = '[email protected]',

stackimpact/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
class Agent:
2828

29-
AGENT_VERSION = "1.0.3"
29+
AGENT_VERSION = "1.0.4"
3030
SAAS_DASHBOARD_ADDRESS = "https://agent-api.stackimpact.com"
3131

3232
def __init__(self, **kwargs):

stackimpact/reporters/allocation_reporter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def report(self):
130130
return
131131

132132
self.profile.normalize(self.profile_duration)
133+
self.profile.filter(2, 1000, float("inf"))
133134

134135
metric = Metric(self.agent, Metric.TYPE_PROFILE, Metric.CATEGORY_MEMORY_PROFILE, Metric.NAME_UNCOLLECTED_ALLOCATIONS, Metric.UNIT_BYTE)
135136
measurement = metric.create_measurement(Metric.TRIGGER_TIMER, self.profile.measurement, 1, self.profile)

stackimpact/reporters/block_reporter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ def report(self):
189189

190190
with self.profile_lock:
191191
self.block_profile.normalize(self.profile_duration)
192+
self.block_profile.filter(2, 1, float("inf"))
192193

193194
metric = Metric(self.agent, Metric.TYPE_PROFILE, Metric.CATEGORY_BLOCK_PROFILE, Metric.NAME_BLOCKING_CALL_TIMES, Metric.UNIT_MILLISECOND)
194195
measurement = metric.create_measurement(Metric.TRIGGER_TIMER, self.block_profile.measurement, 1, self.block_profile)
@@ -197,6 +198,7 @@ def report(self):
197198
if self.block_profile.num_samples > 0 and self.http_profile.num_samples > 0:
198199
self.http_profile.normalize(self.profile_duration)
199200
self.http_profile.convert_to_percent(self.block_profile.measurement)
201+
self.block_profile.filter(2, 1, 100)
200202

201203
metric = Metric(self.agent, Metric.TYPE_PROFILE, Metric.CATEGORY_HTTP_TRACE, Metric.NAME_HTTP_TRANSACTION_BREAKDOWN, Metric.UNIT_PERCENT)
202204
measurement = metric.create_measurement(Metric.TRIGGER_TIMER, self.http_profile.measurement, None, self.http_profile)

stackimpact/reporters/cpu_reporter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ def report(self):
154154
with self.profile_lock:
155155
self.profile.evaluate_percent(self.profile_duration / self.SAMPLING_RATE)
156156

157+
self.profile.filter(2, 1, 100)
158+
157159
metric = Metric(self.agent, Metric.TYPE_PROFILE, Metric.CATEGORY_CPU_PROFILE, Metric.NAME_MAIN_THREAD_CPU_USAGE, Metric.UNIT_PERCENT)
158160
measurement = metric.create_measurement(Metric.TRIGGER_TIMER, self.profile.measurement, None, self.profile)
159161
self.agent.message_queue.add('metric', metric.to_dict())

0 commit comments

Comments
 (0)