|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-08-12 20:43:22
At 05:17 PM 8/12/2002, William E. Kempf wrote:
>> The trick would be to do it in a way that automates the introduction
into
>> status tables.
>>
>> For example, say the boost::shared_ptr test program wrote this to cout:
>>
>> <metric type="space" description="shared_ptr<> size"
>> unit="bytes" value="8"></metric>
>>
>> Then reporting programs which were interested in could include these
>> results in their output. No cost to test programs which don't wish to
>> report any size, no cost to reporting programs which don't care to
report
>> size metrics. No manual intervention.
>
>Contrary to the marketing of XML, that's really not a format that's very
>readable to users.
But humans would not be the main readers. Various post-process converters,
typically to HTML, would be the most common readers.
> So, what I'd recommend is turning things like this into
>a method call in Boost.Test. The method call would be responsible for
>generating meaningful output. The definition of "meaningful" would then
>depend upon need, as specified by command line options. By default the
>output would be generated for human consumption, but with proper command
>line options could be reconfigured to produce XML.
That's fine with me.
>boost::test::test_log log;
>
>log.report_metric(boost::space, "shared_ptr<> size", boost::bytes,
>sizeof(shared_ptr<int>));
>
>c:\>test_shared_ptr -BOOST_TEST_OUTPUT=XML
>
>Obviously I glossed over a lot of implementation details, but does this
>make sense?
Yes.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk