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

Appearance settings

Commit 540a840

Browse filesBrowse files
committed
readme update, resource import fix on windows
1 parent 68847ac commit 540a840
Copy full SHA for 540a840

File tree

4 files changed

+33
-13
lines changed
Filter options

4 files changed

+33
-13
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ See full [documentation](https://stackimpact.com/docs/) for reference.
2828

2929
* Linux, OS X or Windows. Python version 2.7, 3.4 or higher.
3030
* Memory allocation profiler and some GC metrics are only available for Python 3.
31-
* CPU and Time profilers only support Linux and OS X.
31+
* Profilers only support Linux and OS X.
3232
* Time (blocking call) profiler supports threads and gevent.
33+
* On unix systems the profilers use the following signals: SIGPROF, SIGALRM, SIGUSR2. Only SIGUSR2 is handled transparently, i.e. it should not conflict with previousely registered handlers.
3334

3435

3536
## Getting started
@@ -73,6 +74,8 @@ Other initialization options:
7374
* `app_environment` (Optional) Used to differentiate applications in different environments.
7475
* `host_name` (Optional) By default, host name will be the OS hostname.
7576
* `debug` (Optional) Enables debug logging.
77+
* `cpu_profiler_disabled`, `allocation_profiler_disabled`, `block_profiler_disabled`, `error_profiler_disabled` (Optional) Disables respective profiler when `True`.
78+
* `include_agent_frames`, `include_system_frames` (Optional) Set to `True` to not exclude agent and/or system stack frames from profiles.
7679

7780

7881

‎README.rst

Copy file name to clipboardExpand all lines: README.rst
+22-10Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,17 @@ Documentation
3737
See full `documentation <https://stackimpact.com/docs/>`__ for
3838
reference.
3939

40-
Requirements
41-
------------
40+
Supported environment
41+
---------------------
4242

4343
- Linux, OS X or Windows. Python version 2.7, 3.4 or higher.
44-
- Memorly allocation profiler and some GC metrics are only available
45-
for Python 3.
46-
- CPU and Time profilers only supports Linux and OS X.
44+
- Memory allocation profiler and some GC metrics are only available for
45+
Python 3.
46+
- Profilers only support Linux and OS X.
4747
- Time (blocking call) profiler supports threads and gevent.
48+
- On unix systems the profilers use the following signals: SIGPROF,
49+
SIGALRM, SIGUSR2. Only SIGUSR2 is handled transparently, i.e. it
50+
should not conflict with previousely registered handlers.
4851

4952
Getting started
5053
---------------
@@ -58,7 +61,7 @@ Sign up for a free account at
5861
Installing the agent
5962
^^^^^^^^^^^^^^^^^^^^
6063

61-
Install the Go agent by running
64+
Install the Python agent by running
6265

6366
::
6467

@@ -81,7 +84,10 @@ Configuration section.
8184
8285
agent = stackimpact.start(
8386
agent_key = 'agent key here',
84-
app_name = 'MyPythonApp',
87+
app_name = 'MyPythonApp')
88+
89+
Add the agent initialization to the worker code, e.g. wsgi.py, if
90+
applicable.
8591

8692
Other initialization options:
8793

@@ -92,13 +98,19 @@ Other initialization options:
9298
- ``host_name`` (Optional) By default, host name will be the OS
9399
hostname.
94100
- ``debug`` (Optional) Enables debug logging.
101+
- ``cpu_profiler_disabled``, ``allocation_profiler_disabled``,
102+
``block_profiler_disabled``, ``error_profiler_disabled`` (Optional)
103+
Disables respective profiler when ``True``.
104+
- ``include_agent_frames``, ``include_system_frames`` (Optional) Set to
105+
``True`` to not exclude agent and/or system stack frames from
106+
profiles.
95107

96108
Analyzing performance data in the Dashboard
97109
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98110

99-
Once your application is restarted, you can start observing regular and
100-
anomaly-triggered CPU, memory, I/O, and other hot spot profiles,
101-
execution bottlenecks as well as process metrics in the
111+
Once your application is restarted, you can start observing continuous
112+
CPU, memory, I/O, and other hot spot profiles, execution bottlenecks as
113+
well as process metrics in the
102114
`Dashboard <https://dashboard.stackimpact.com/>`__.
103115

104116
Troubleshooting

‎stackimpact/reporters/block_reporter.py

Copy file name to clipboardExpand all lines: stackimpact/reporters/block_reporter.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ def process_sample(self, signal_frame, sample_time, main_thread_id):
110110
start = time.clock()
111111

112112
current_frames = sys._current_frames()
113-
for thread_id, thread_frame in current_frames.items():
113+
items = current_frames.items()
114+
for thread_id, thread_frame in items:
114115
if thread_id == main_thread_id:
115116
thread_frame = signal_frame
116117

@@ -121,6 +122,7 @@ def process_sample(self, signal_frame, sample_time, main_thread_id):
121122

122123
thread_id, thread_frame, stack = None, None, None
123124

125+
items = None
124126
current_frames = None
125127

126128
self.block_profile._overhead += (time.clock() - start)

‎stackimpact/runtime.py

Copy file name to clipboardExpand all lines: stackimpact/runtime.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
import os
77
import signal
88
from functools import wraps
9-
9+
try:
10+
import resource
11+
except ImportError:
12+
pass
1013

1114

1215
class runtime_info:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.