<div class="gmail_quote">On Thu, Apr 22, 2010 at 10:37 AM, Clinton Stimpson <span dir="ltr"><<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Apr 21, 2010, at 11:28 PM, Matt McCormick wrote:<br>
<br>
> Clinton Stimpson <clinton@...> writes:<br>
><br>
>><br>
>> Hi,<br>
>><br>
>> Can ctest report peak memory usage like it reports time and other<br>
>> measurements?<br>
>><br>
>> Thanks,<br>
>> Clint<br>
>> _______________________________________________<br>
><br>
> You could have ctest run valgind's massif tool. An example can be found here:<br>
> <a href="http://insight-journal.org/browse/publication/722" target="_blank">http://insight-journal.org/browse/publication/722</a><br>
> The source is downloadable.<br>
> The output of massif is processed with ms_print, which is parsed by a python<br>
> script for the peak.<br>
><br>
<br>
</div><div class="im">Is there some way to put that result into the ctest output file, Test.xml, as a measurement?<br>
<br></div></blockquote><div><br></div><div>Anything that appears in the test's output on stdout as one of the expected "DartMeasurement" formats will be transformed into a NamedMeasurement element in Test.xml and will appear in the test results page in a table.</div>
<div><br></div><div>For example, on this page:</div><div><a href="http://www.cdash.org/CDash/testDetails.php?test=40904791&build=591842">http://www.cdash.org/CDash/testDetails.php?test=40904791&build=591842</a></div>
<div><br></div><div>The NamedMeasurements are in the table immediately underneath the header. The measurements on that page are named "Execution Time (s)", "Command Line", "Completion Status" and "Exit Value".</div>
<div><br></div><div>To send a number (for example, 42) as a measurement named "Simple", try printing output like this on stdout:</div><div><DartMeasurement name="Simple" type="numeric/integer">42</DartMeasurement></div>
<div><div><DartMeasurement name="pi" type="numeric/double">3.14159</DartMeasurement></div><div><br></div><div>Valid type values include: (I'm inferring this part from looking at the VTK source code...)</div>
<div> image/png</div><div> numeric/integer</div><div> numeric/double</div><div> text/string</div><div><br></div></div><div>VTK testing uses this technique to send images to the CDash server when an image comparison test fails.</div>
<div><br></div><div>You can see an example of that here:</div><div><a href="http://www.cdash.org/CDash/testDetails.php?test=51100873&build=591789">http://www.cdash.org/CDash/testDetails.php?test=51100873&build=591789</a></div>
<div><br></div><div>And you can search the CMake and VTK source trees for "DartMeasurement" to see the code that deals with this stuff.</div><div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br>
</div></div>