We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4da4ec commit 586c767Copy full SHA for 586c767
examples/flask_app.py
@@ -37,11 +37,11 @@
37
# Simulate CPU intensive work
38
def simulate_cpu():
39
duration = 10 * 60 * 60
40
- usage = 20
+ usage = 10
41
42
while True:
43
for j in range(0, duration):
44
- for i in range(0, usage * 20000):
+ for i in range(0, usage * 15000):
45
text = "text1" + str(i)
46
text = text + "text2"
47
setup.py
@@ -2,7 +2,7 @@
2
3
setup(
4
name = 'stackimpact',
5
- version = '1.1.1',
+ version = '1.1.2',
6
description = 'StackImpact Python Agent',
7
author = 'StackImpact',
8
author_email = 'devops@stackimpact.com',
stackimpact/agent.py
@@ -26,7 +26,7 @@
26
27
class Agent:
28
29
- AGENT_VERSION = "1.1.1"
+ AGENT_VERSION = "1.1.2"
30
SAAS_DASHBOARD_ADDRESS = "https://agent-api.stackimpact.com"
31
32
def __init__(self, **kwargs):
stackimpact/reporters/allocation_reporter.py
@@ -41,7 +41,7 @@ def start(self):
self.reset()
- self.profiler_scheduler = ProfilerScheduler(self.agent, 20, 5, 120, self.record, self.report)
+ self.profiler_scheduler = ProfilerScheduler(self.agent, 30, 4, 120, self.record, self.report)
self.profiler_scheduler.start()
stackimpact/reporters/process_reporter.py
@@ -15,7 +15,7 @@ class ProcessReporter:
15
def __init__(self, agent):
16
self.agent = agent
17
self.started = False
18
- self.metrics = {}
+ self.metrics = None
19
self.report_timer = None
20
21
@@ -24,6 +24,8 @@ def start(self):
24
return
25
self.started = True
+ self.reset()
+
self.report_timer = self.agent.schedule(60, 60, self.report)
@@ -36,6 +38,10 @@ def stop(self):
36
+ def reset(self):
+ self.metrics = {}
def report(self):
# CPU
if runtime_info.OS_LINUX or runtime_info.OS_DARWIN:
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments