Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ca08a03

Browse files
OS check in allocation reporter
1 parent 832ee43 commit ca08a03

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

‎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.1.2',
5+
version = '1.1.3',
66
description = 'StackImpact Python Agent',
77
author = 'StackImpact',
88
author_email = 'devops@stackimpact.com',

‎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.1.2"
29+
AGENT_VERSION = "1.1.3"
3030
SAAS_DASHBOARD_ADDRESS = "https://agent-api.stackimpact.com"
3131

3232
def __init__(self, **kwargs):

‎stackimpact/config_loader.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ def load(self):
4747
if self.agent.config.is_agent_enabled():
4848
self.agent.error_reporter.start()
4949
self.agent.process_reporter.start()
50+
self.agent.log('Agent activated')
5051
else:
5152
self.agent.error_reporter.stop()
5253
self.agent.process_reporter.stop()
54+
self.agent.log('Agent deactivated')
5355

5456

5557
except Exception:

‎stackimpact/reporters/allocation_reporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def start(self):
3131
if self.agent.get_option('allocation_profiler_disabled'):
3232
return
3333

34-
if not min_version(3, 4):
34+
if not (runtime_info.OS_LINUXorruntime_info.OS_DARWIN) ornotmin_version(3, 4):
3535
self.agent.log('Memory allocation profiling is available for Python 3.4 or higher')
3636
return
3737

‎tests/reporters/allocation_reporter_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
import threading
66

77
import stackimpact
8-
from stackimpact.runtime import min_version
8+
from stackimpact.runtime import min_version, runtime_info
99

1010

1111
class AllocationReporterTestCase(unittest.TestCase):
1212

1313
def test_record_allocation_profile(self):
14-
if not min_version(3, 4):
14+
if not (runtime_info.OS_LINUXorruntime_info.OS_DARWIN) ornotmin_version(3, 4):
1515
return
1616

1717
stackimpact._agent = None

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /