Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f932af2

Browse files
committed
remove deprecated functionality
1 parent 6e67111 commit f932af2

File tree

10 files changed

+8
-499
lines changed

10 files changed

+8
-499
lines changed

README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ StackImpact is a production-grade performance profiler built for both production
99
#### Features
1010

1111
* Continuous hot spot profiling of CPU usage, memory allocation and blocking calls.
12-
* TensorFlow profiling.
1312
* Error and exception monitoring.
1413
* Health monitoring including CPU, memory, garbage collection and other runtime metrics.
1514
* Alerts on profile anomalies.
@@ -143,16 +142,6 @@ agent.start_allocation_profiler();
143142
agent.stop_allocation_profiler();
144143
```
145144

146-
```python
147-
# Start TensorFlow profiler.
148-
agent.start_tf_profiler();
149-
```
150-
151-
```python
152-
# Stop TensorFlow profiler and report the recorded profile to the Dashboard.
153-
agent.stop_tf_profiler();
154-
```
155-
156145
#### Analyzing performance data in the Dashboard
157146

158147
Once your application is restarted, you can start observing continuous CPU, memory, I/O, and other hot spot profiles, execution bottlenecks as well as process metrics in the [Dashboard](https://dashboard.stackimpact.com/).

README.rst

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Features
2222

2323
- Continuous hot spot profiling of CPU usage, memory allocation and
2424
blocking calls.
25-
- TensorFlow profiling.
2625
- Error and exception monitoring.
2726
- Health monitoring including CPU, memory, garbage collection and other
2827
runtime metrics.
@@ -39,9 +38,8 @@ The StackImpact profiler agent is imported into a program and used as a
3938
normal package. When the program runs, various sampling profilers are
4039
started and stopped automatically by the agent and/or programmatically
4140
using the agent methods. The agent periodically reports recorded
42-
profiles and metrics to the StackImpact Dashboard. If an application has
43-
multiple processes, also referred to as workers, instances or nodes,
44-
only one or two processes will have active agents at any point of time.
41+
profiles and metrics to the StackImpact Dashboard. The agent can also
42+
operate in manual mode, which should be used in development only.
4543

4644
Documentation
4745
^^^^^^^^^^^^^
@@ -193,16 +191,6 @@ disabled with ``auto_profiling: False``.
193191
# Stop heap allocation profiler and report the recorded profile to the Dashboard.
194192
agent.stop_allocation_profiler();
195193
196-
.. code:: python
197-
198-
# Start TensorFlow profiler.
199-
agent.start_tf_profiler();
200-
201-
.. code:: python
202-
203-
# Stop TensorFlow profiler and report the recorded profile to the Dashboard.
204-
agent.stop_tf_profiler();
205-
206194
Analyzing performance data in the Dashboard
207195
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
208196

@@ -222,7 +210,4 @@ Overhead
222210
--------
223211

224212
The agent overhead is measured to be less than 1% for applications under
225-
high load. For applications that are horizontally scaled to multiple
226-
processes, StackImpact agents are only active on a small subset of the
227-
processes at any point of time, therefore the total overhead is much
228-
lower.
213+
high load.

examples/tensorflow/app.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

examples/tensorflow/manual.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

examples/tensorflow/manual_keras.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def read(fname):
66

77
setup(
88
name = 'stackimpact',
9-
version = '1.2.4',
9+
version = '1.2.6',
1010
description = 'StackImpact Python Profiler',
1111
long_description = read('README.rst'),
1212
author = 'StackImpact',

stackimpact/agent.py

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@
2626
from .profilers.cpu_profiler import CPUProfiler
2727
from .profilers.allocation_profiler import AllocationProfiler
2828
from .profilers.block_profiler import BlockProfiler
29-
from .profilers.tf_profiler import TFProfiler
3029

3130

3231
class Span(object):
3332

3433
def __init__(self, stop_func = None):
3534
if stop_func:
3635
self.stop_func = stop_func
36+
else:
37+
self.stop_func = None
3738

3839

3940
def stop(self):
@@ -51,7 +52,7 @@ def __exit__(self, exc_type, exc_value, traceback):
5152

5253
class Agent(object):
5354

54-
AGENT_VERSION = "1.2.4"
55+
AGENT_VERSION = "1.2.6"
5556
SAAS_DASHBOARD_ADDRESS = "https://agent-api.stackimpact.com"
5657

5758
def __init__(self, **kwargs):
@@ -100,15 +101,6 @@ def __init__(self, **kwargs):
100101
config.report_interval = 120
101102
self.block_reporter = ProfileReporter(self, BlockProfiler(self), config)
102103

103-
config = ProfilerConfig()
104-
config.log_prefix = 'TensorFlow profiler'
105-
config.max_profile_duration = 20
106-
config.max_span_duration = 5
107-
config.max_span_count = 30
108-
config.span_interval = 20
109-
config.report_interval = 120
110-
self.tf_reporter = ProfileReporter(self, TFProfiler(self), config)
111-
112104
self.options = None
113105

114106

@@ -160,7 +152,6 @@ def start(self, **kwargs):
160152
self.cpu_reporter.setup()
161153
self.allocation_reporter.setup()
162154
self.block_reporter.setup()
163-
self.tf_reporter.setup()
164155
self.span_reporter.setup()
165156
self.error_reporter.setup()
166157
self.process_reporter.setup()
@@ -211,7 +202,6 @@ def enable(self):
211202
self.cpu_reporter.start()
212203
self.allocation_reporter.start()
213204
self.block_reporter.start()
214-
self.tf_reporter.start()
215205
self.span_reporter.start()
216206
self.error_reporter.start()
217207
self.process_reporter.start()
@@ -223,7 +213,6 @@ def disable(self):
223213
self.cpu_reporter.stop()
224214
self.allocation_reporter.stop()
225215
self.block_reporter.stop()
226-
self.tf_reporter.stop()
227216
self.span_reporter.stop()
228217
self.error_reporter.stop()
229218
self.process_reporter.stop()
@@ -244,8 +233,6 @@ def profile(self, name='Default'):
244233
active_reporters.append(self.allocation_reporter)
245234
if self.block_reporter.started:
246235
active_reporters.append(self.block_reporter)
247-
if self.tf_reporter.started:
248-
active_reporters.append(self.tf_reporter)
249236

250237
if len(active_reporters) > 0:
251238
selected_reporter = active_reporters[int(math.floor(random.random() * len(active_reporters)))]
@@ -318,14 +305,6 @@ def stop_block_profiler(self):
318305
self._stop_profiler(self.block_reporter)
319306

320307

321-
def start_tf_profiler(self):
322-
self._start_profiler(self.tf_reporter)
323-
324-
325-
def stop_tf_profiler(self):
326-
self._stop_profiler(self.tf_reporter)
327-
328-
329308
def destroy(self):
330309
if not self.agent_started:
331310
self.log('Agent has not been started')
@@ -340,15 +319,13 @@ def destroy(self):
340319
self.cpu_reporter.stop()
341320
self.allocation_reporter.stop()
342321
self.block_reporter.stop()
343-
self.tf_reporter.stop()
344322
self.error_reporter.stop()
345323
self.span_reporter.stop()
346324
self.process_reporter.stop()
347325

348326
self.cpu_reporter.destroy()
349327
self.allocation_reporter.destroy()
350328
self.block_reporter.destroy()
351-
self.tf_reporter.destroy()
352329
self.error_reporter.destroy()
353330
self.span_reporter.destroy()
354331
self.process_reporter.destroy()

0 commit comments

Comments
 (0)