I am wanting to get pass percentage of our builds. So I need to do two queries, one to get the total number of builds and one to get total failed builds. From there I can get the percent of pass rate for builds.
Some contexts of what my logs look like. Each log entry is a test that has pass/fail as an outcome. There are multiple tests per build. So if one of the tests fail, we consider that build a failure.
So if i do a count_distinct(buildNumber) that gets the number of total builds pass or failed.
Then if do a where outcome="failed" and then count_distinct(buildNumber) that will get only builds that have a failed test.
From there I can subtract the failed builds from the total builds to get a count of passed builds.
How can I do this in one query?
Please sign in to leave a comment.