Custom Statistics

Skip to end of metadata
Go to start of metadata
You are viewing documentation of TeamCity 5.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.
Search

Searching TeamCity 5.x Documentation

Table of Contents

TeamCity provides a number of ways to customize statistics. You can add your own custom metrics to integrate your tools/processes, insert any statistical chart/report into any extension place and so on.

Quick Start

  • An easy way to add custom statistics is to just insert a jsp fragment into WebPlace using a helper bean:
  • To insert statistics chart into a jsp page:
  • To add a custom build metric, extend BuildValueTypeBase to just define your build metric calculation method, appearance, and key. After that you can reference this metric by its key in statistics chart/report tags.

More Details

BuildType Statistics tab extension point

Customizing chart appearance

  • width, height — chart image size
  • hideFilters — suppress filter controls

Adding custom metrics

  1. Implement jetbrains.buildServer.serverSide.statistics.ValueType, extend BuildFinishAwareValueTypeBase or CompositeVTB for convenience
  2. Register it using jetbrains.buildServer.serverSide.statistics.ValueProviderRegistry.registerValueProvider

Custom build metrics details

  1. Implement jetbrains.buildServer.serverSide.statistics.build.BuildFinishAware in your ValueType to be notified of build finished event.
  2. Calculate your metric.
  3. Employ jetbrains.buildServer.serverSide.statistics.build.BuildDataStorage.publishValue to publish your value.
  4. Employ jetbrains.buildServer.serverSide.statistics.build.BuildDataStorage.getDataSet to retrieve selected data.



See Also:

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.