History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CCNET-758
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Ashish Kumar
Reporter: Grant Drake
Votes: 3
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
CruiseControl .NET

Add attribute to <statistics> publisher to enable replacing default statistics

Created: 05/Oct/06 03:43 AM   Updated: 13/May/07 12:21 PM
Component/s: Publisher
Affects Version/s: 1.1
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
Currently the statistics pubisher only allows you to add additional columns on top of a "hard-coded" set of statistics columns inside the StatisticsBuilder class.

This is so close to being as flexible as what it could be - those of use who do not want FxCop statistics or wnat to rename the columns to help with formatting the output are stymied.

By adding a "includeDefaults="false" or similar attribute (default value being true if not specified) to the <statistics> element it would give the flexibility for developers to completely replace this set with their own.

The complicating wrinkle is the StatisticsChartGenerator, which in the constructor has some hard-coded "relevantStats". This could be replaced by adding another attribute to the <statistic> element such as "relevant=true".


 All   Comments   Work Log   Change History      Sort Order:
Simone Chiaretta [11/Nov/06 07:58 AM]
I got the problem, too...
I use MbUnit, so I need different xpath for the same TestCount value, this is also used as stats to build the chart.
But I cannot override it setting a new TestCount stats inside the statistics publisher, so I'm forced to change the name of the statistic like this:
<statistic name='TestCountMb' xpath='sum(//report-result/counter/@run-count)'/>

and that's bad since now it's not used by the chart generator any more, and then I also have to change the statistics xsl and hard-code the table names.

Ashish Kumar [13/May/07 11:52 AM]
As of build http://ccnetlive.thoughtworks.com/CCNet-builds/1.3/1.3.0.2855, it is possible to replace the default statistics, by giving a different xpath definition in the config file. Also an attribute generateGraph has been added to Statistic and FirstMatch element for obvious purpose. Graphs will be generated only for those metrics which have been configured thus in the publishers section.
At present there is no way to remove the default statistics completely. This is simple, and I would do it in the next check in.

Ashish Kumar [13/May/07 12:21 PM]
Fixed in version 1.3.0.2856. Optional attributes include and generateGraph should do the trick.