Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonar database structure & sonar api metrics

Tags:

java

sonarqube

I have two questions regarding sonar:

  1. I have taken a look at the database of sonar. I was wondering where sonar stores the results of each measurement?

    I found only the table measure_data, but the field data looks to me like a has value. Can anyone tell me where sonar stores the data of all measurements?

    Yes I know, that it is better to use the REST API, and I will do it, but I also want to know, how the database is used by sonar itself.

  2. Is there a way by using the API to get a full list of all used metrics?

like image 510
LStrike Avatar asked Nov 12 '22 09:11

LStrike


1 Answers

I figured question number 2 out:

List<Metric> smq = sonar.findAll(MetricQuery.all());
    System.out.println(smq);

    for(int i = 0; i< smq.size(); i++){
       System.out.println(smq.get(i));
    }
like image 194
LStrike Avatar answered Nov 15 '22 06:11

LStrike