[CMake] ctest & peak memory usage
David Cole
david.cole at kitware.com
Thu Apr 22 18:02:53 EDT 2010
On Thu, Apr 22, 2010 at 10:37 AM, Clinton Stimpson <clinton at elemtech.com>wrote:
>
> On Apr 21, 2010, at 11:28 PM, Matt McCormick wrote:
>
> > Clinton Stimpson <clinton at ...> writes:
> >
> >>
> >> Hi,
> >>
> >> Can ctest report peak memory usage like it reports time and other
> >> measurements?
> >>
> >> Thanks,
> >> Clint
> >> _______________________________________________
> >
> > You could have ctest run valgind's massif tool. An example can be found
> here:
> > http://insight-journal.org/browse/publication/722
> > The source is downloadable.
> > The output of massif is processed with ms_print, which is parsed by a
> python
> > script for the peak.
> >
>
> Is there some way to put that result into the ctest output file, Test.xml,
> as a measurement?
>
>
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.
For example, on this page:
http://www.cdash.org/CDash/testDetails.php?test=40904791&build=591842
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".
To send a number (for example, 42) as a measurement named "Simple", try
printing output like this on stdout:
<DartMeasurement name="Simple" type="numeric/integer">42</DartMeasurement>
<DartMeasurement name="pi" type="numeric/double">3.14159</DartMeasurement>
Valid type values include: (I'm inferring this part from looking at the VTK
source code...)
image/png
numeric/integer
numeric/double
text/string
VTK testing uses this technique to send images to the CDash server when an
image comparison test fails.
You can see an example of that here:
http://www.cdash.org/CDash/testDetails.php?test=51100873&build=591789
And you can search the CMake and VTK source trees for "DartMeasurement" to
see the code that deals with this stuff.
HTH,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100422/3c3b0a34/attachment-0001.htm>
More information about the CMake
mailing list