Skip to content

Commit

Permalink
Count unclassified failures in scripts/bors-stats.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Anviking committed Feb 10, 2022
1 parent 424c0f9 commit 428f50b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/bors-stats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ def list()
nSucc = comments[:filtered].filter { |x| x.succeeded }.length
nFailed = nTot - nSucc

# this logic could be moved to the `breakdown` function.
nFailedNoCause = comments[:filtered].filter { |c| (not c.succeeded) and c.causes.empty? }.length

puts ""
puts "succeeded: " + (bold nSucc.to_s) + " failed: " + (bold nFailed.to_s) + " (" + (bold (failure_rate(nFailed, nTot))) + ") total: " + (bold nTot.to_s)
puts "Excluding " + nExcluded.to_s + " #expected or #duplicate failures"
puts "Unclassified: " + (bold nFailedNoCause.to_s) + " (" + (bold (failure_rate(nFailedNoCause, nFailed))) + " of all failures)"
puts ""
puts "Broken down by tags/issues:"
breakdown(comments[:filtered],tm).each do |k,v|
Expand Down Expand Up @@ -154,7 +158,7 @@ def try_fetch_system(comment)
# build.
BorsComment = Struct.new(:url, :bodyText, :links, :createdAt, :tags, :succeeded) do
def causes
self.tags.filter {|x| x.start_with? "#" }
self.tags.filter {|x| x != "hydra" and x != "buildkite" } # HACK; works for now
end

def pretty(showDetails = :auto)
Expand Down

0 comments on commit 428f50b

Please sign in to comment.