Where can I find what each metric_id in the database corresponds to?

Hi,

We are writing a custom plugin where we need to graph metrics over the entire history for a build type.

I understand that this is stored in the build_data_storage table as build_id, metric_id, metric_value

Here is a sample from our database for a given build.

build_id    metric_id    metric_value
3019    -6371738409877395985    119313
3019    -4924562750898875443    1
3019    -3896958621569208557    1
3019    -3888535176583481057    1843
3019    -2913913962870227706    72
3019    -2703241747681962594    2018
3019    -2671230126101543203    18337
3019    -704913538714156794    80
3019    2142046045481688914    425
3019    2499376200604796440    91
3019    2873035392072723275    626
3019    3014510524022395756    14693911
3019    5485618390749745482    68
3019    5744866293795496522    216
3019    5923324090471097048    2573
3019    6492160027654944357    73

Where can I find what each metric_id corresponds to? For example what corresponds to number of classes, number of covered classes, etc?
The reason for using SQL is that we have around 40+ projects with over 300 builds per day and we want to see some data for atleast a few weeks.
We need to compare metrics on branches, etc.

Can someone tell me as to what metric id corresponds to what?

Thanks

1 comment
Comment actions Permalink

Hi Ashish,

Sorry for the deplay in replying.

We would strongly discourage direct access to the database. Apart from it's not documented nature, the structure can change with future versions of TeamCity.

For API ways to access the values youc an check code of REST API, e.g. serach for "statistics" and see getBuildStatisticsValues method in http://svn.jetbrains.org/teamcity/plugins/rest-api/branches/Faradi-7.1.x/src/jetbrains/buildServer/server/rest/request/BuildRequest.java

Answering your question, the value in the database is Hash.calc(ValueProvider.getKey())


Could you please note why the default charts abilities in TeamCIty are not enough for your case?

0

Please sign in to leave a comment.