<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>The amount of memory is roughly proportional to the number of
executed lines. So you should quickly get to a plateau of memory
usage.</p>
<p>There is no configuration option in coverage to make it dump the
data file occasionally, but you might be able to use the coverage
API to do what you want. I'd be interested to hear the outcome of
that.</p>
<p>--Ned.<br>
</p>
<br>
<div class="moz-cite-prefix">On 1/23/17 2:54 AM, Ankit Chopra wrote:<br>
</div>
<blockquote
cite="mid:CAOYWu2vc0tVar+jr2x1zejqxqc9_J+C=FFRAPPnJxELvoLh_qg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Ned,
<div><br>
</div>
<div>Thanks for replying. Its a Python App running on django.
Yes I can figure out a way to gracefully stop it and start it
again as we are running bunch of the instances at a time. this
is the option with us but I was looking that if there is any
configuration in coverage.py with which I can expect the dump
intermediately. </div>
<div>Another thing which if you can make me understand is how
coverage.py keeps data in memory. Let say if i let it runs
for a month, does it going to increase the memory usage with
time or it loads all the source code and maintain a dictionary
with flag 0 or 1 for every line. If its like that then it
will not use the more memory with time, it will just mark the
1 for the lines executed.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Ankit Chopra</div>
<div> </div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Jan 23, 2017 at 3:55 AM, Ned
Batchelder <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:ned@nedbatchelder.com" target="_blank">ned@nedbatchelder.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><span class=""> On
1/22/17 4:04 AM, Ankit Chopra wrote:<br>
<blockquote type="cite">
<div dir="ltr"><span style="font-size:12.8px">Hi All, </span>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">We want to run
coverage.py in our production application. We want
to discover the obsolete code and see the report
with actual production load. </div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">I have played with
coverage.py tool and have seen that it creates the
report after execution/termination and till that
time it keeps everything in memory. </div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Is there a way I can
configure it to dump the report at regular
interval like every hour or daily without stopping
my application. and Later on I can merge and
create a consolidated report. </div>
<br>
</div>
</blockquote>
</span> What kind of application is it, why does it run so
long, and is there a natural unit of work that you could
take advantage of? For example, if it's a web application,
the simplest thing would be to measure coverage on a
worker process, and start and stop workers on the
frequency you want.<span class="HOEnZb"><font
color="#888888"><br>
<br>
--Ned.<br>
</font></span></div>
<br>
______________________________<wbr>_________________<br>
testing-in-python mailing list<br>
<a moz-do-not-send="true"
href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.<wbr>org</a><br>
<a moz-do-not-send="true"
href="http://lists.idyll.org/listinfo/testing-in-python"
rel="noreferrer" target="_blank">http://lists.idyll.org/<wbr>listinfo/testing-in-python</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>