Is it possible in SonarQube to calculate code coverage for a delta only?
For instance: a project had 1000 lines yesterday and its unit test coverage results are already in SonarQube. A new commit was pushed today with an extra 100 lines of code and additional test cases. These additional test cases cover 70 of the 100 new lines. Is there a way, possibly using TimeMachine, to retrieve/calculate the code coverage for the delta only? (in this case 70%)
You're looking for "Coverage on New Code", which is calculated against the "Leak period", i.e. the first listing in Administration > General > Differential Views.
Your problem is that differential values are calculated during analysis, so you can't update the leak period value and retroactively get exactly what you described. But narrow the leak period value down from the default 30 days (maybe previous_version?) and you'll get close going forward.
Related
I recently did an RNAseq experiment in which I had controls and experiments at 3 different time periods. My samples were distributed as following for a total of 10 samples:
T1_control1, T2_control1, T2_control2, T3_control1,
T1_exp1, T1_exp2, T2_exp1, T2_exp2, T3_exp1, T3_exp2
I did differential expression analysis with DESeq2 and from it I obtained 3 files from each time period T1, T2, and T3 that show the logFold change values from the control to the experimental for each gene. My question is how I can statistically compare the logFold change value for one gene in one period vs another time period. I am not sure what test to use since there is only one logFold change values per each time period for each gene.
Thank you in advance.
I am not sure what test to use since there is only one logFold change values per each time period for each gene.
Since RNA-sequencing is costly (for many purposes), I think most groups ensure their sequencing run is accurate is by combining multiple biological replicates in each group or sequencing deep. An argument could be made that showing only one data point for each gene at each time point is appropriate given that standard protocols were followed.
Although one option is to increase the sample size of each time period by determining fold change between each control-experimental partner. It would be important however to consult the literature and colleagues whether this is appropriate for the specific type of analysis you are doing.
I'm using jmeter 5 to launch a simple load test. now i want to understand console output. But i have the difficulty with max value.
I was expected that max is a Maximum elapsed time of all the requests. But during the load test, his value decrease and increase.
Load test parameter:
loops: 1000
concurent threads: 5
rand-up: 1s
The image below show my console output. And you can see the max value decrease and increase. I don't know why.
please someone can explain me ? I have a some problems to understand variations of other values.
It's simple.
There, on that picture, you've got two types of reporting records:
1) Ones with "summary =" are overall, for the whole test duration.
As you can see, there Max values are gradually, but slowly, changes towards increase (Mins do the opposite, expectedly).
Which is expected. I shouldn't go for a why-s here, right?
2) Ones with "summary + " are delta.
That's what was added for a certain time period (30 sec here), and all the values you observe there are calculated for that time span ONLY.
Again, obviously - they are different, and independent of each other.
So, concluding: nothing actually "jumps" up there, everything works as expected, you'd just misinterpret it.
Hope that soothes your concerns.
P.S. You'd cleared any mentions of InfluxDB & Grafana out of the questions, but I have to add that it works similar way for that bundle: these values depends on a timeframe & grouping by time (smaller time chunks) within this timeframe.
I am able to generate performance trend report using Jenkins Performance plugin. In performance report what is the significance/meaning of the exponent numbers highlighted in red color in below image. Example -2, +5698, -6657 etc. Not able to find any information related to this
The +value indicates that this build contributed to increase in the response time from the previous build by that 'value'.
Ex: In your case, for the first URI, the average response time increased by +5698 ms, similarly incase of -ve value, it means the current build is faster than the previous by that value. I was able to verify this on my performance trend report.
However i am not sure what the + and - equates to in the "samples" column. Let me know if this works!
To motivate ourselves to increase code coverage of unit tests, we have defined this rules for coverage:
overall code coverage must be > 80%
overall code coverage must not be less than the last time
code coverage on new code must be > 90%
To fulfill rules 1 and 2 I configured a Quality Gate with these conditions:
"Coverage - value - is less than - 80"
"Coverage - delta since previous analysis - is less than - 0"
For rule 3 I think that the following condition would meet it: "Coverage on new code - value - is less than - 90". But it is not possible to choose a value for this condition, only a delta. What is the meaning of a delta here? New code shouldn't have a delta, because it's new. How must i configure the condition to fulfil rule 3?
By default, SonarQube comes with a predefined Quality Gate that is designed to achieve exactly what you want: progressively make you increase your code coverage.
You can take a look at this "SonarQube way" quality gate on Nemo.
The important line is the one which is highlighted on the screenshot. It means: "The code introduced since the beginning of developments on the current version must be covered at least at 80%". If you admit that you are constantly refactoring and rewriting parts of your code, then ultimately your code will be covered at least at 80%.
I'm using SonarQube 4.2.1 for analyzing maven projects and I'd like to fail the quality gate when the number of issues is higher than the last successful analysis (QG was green).
I'm aware of Fail SonarQube quality gate when coverage decreases but it does not cover all my needs, because the QG would be green also, when build #1 has 5 issues (with QG green), build #2 8 issues and build #3 has 7 issues, which is less than the last analysis but still more than last successful build #1.
Any idea how to do this?
You just have to add the following condition:
Metric: "New issues"
Delta since previous analysis
"Is greater than"
"0" in error