File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,18 +234,20 @@ consumption during this execution.
234234The output can be redirected to a log file by passing IO stream as
235235parameter to the decorator like @profile(stream=fp)
236236
237- >>> fp= open (' hi.txt ' ,' w+' )
237+ >>> fp= open (' memory_profiler.log ' ,' w+' )
238238 >>> @ profile(stream = fp)
239239 >>> def my_func ():
240240 ... a = [1] * (10 ** 6)
241241 ... b = [2] * (2 * 10 ** 7)
242242 ... del b
243243 ... return a
244244
245+ For details refer: examples/reporting_file.py
246+
245247Reporting via logger Module:
246248
247- Sometime it'd be very convenient to use logger module specially when
248- we need to use RotatingFileHandler.
249+ Sometime it would be very convenient to use logger module specially
250+ when we need to use RotatingFileHandler.
249251
250252The output can be redirected to logger module by simply making use of
251253LogFile of memory profiler module.
@@ -265,7 +267,7 @@ a parameter to LogFile class of memory profiler module.
265267 >>> import sys
266268 >>> sys.stdout = LogFile(' memory_profile_log' , reportIncrementFlag = False )
267269
268- Refer examples section for details.
270+ For details refer: examples/reportingViaLogger.py
269271
270272=====================
271273 IPython integration
You can’t perform that action at this time.
0 commit comments