Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: golden/go/analysis/status.go

Issue 884943003: Ignore traces (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « golden/go/analysis/analysis_test.go ('k') | golden/go/analysis/triage.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: golden/go/analysis/status.go
diff --git a/golden/go/analysis/status.go b/golden/go/analysis/status.go
index b77343e329ddebf1eb45282ac9ed0def5a51c3c5..d1d90faa86ac9e04d2443453cbcd26eb5ee9be35 100644
--- a/golden/go/analysis/status.go
+++ b/golden/go/analysis/status.go
@@ -52,16 +52,16 @@ type GUICorpusStatus struct {
// calcStatus determines the status based on the current tile. It breaks
// down the status by individual corpora.
-func (a *Analyzer) calcStatus(labeledTile *LabeledTile) *GUIStatus {
- corpStatus := make(map[string]*GUICorpusStatus, len(a.currentIndex.corpora))
+func calcStatus(state *AnalyzeState) *GUIStatus {
+ corpStatus := make(map[string]*GUICorpusStatus, len(state.Index.corpora))
minCommitId := map[string]int{}
okByCorpus := map[string]bool{}
// Gathers unique labels by corpus and label.
byCorpus := map[string]map[types.Label]map[string]bool{}
- for _, corpus := range a.currentIndex.corpora {
- minCommitId[corpus] = len(labeledTile.Commits)
+ for _, corpus := range state.Index.corpora {
+ minCommitId[corpus] = len(state.Tile.Commits)
okByCorpus[corpus] = true
byCorpus[corpus] = map[types.Label]map[string]bool{
types.POSITIVE: map[string]bool{},
@@ -80,7 +80,7 @@ func (a *Analyzer) calcStatus(labeledTile *LabeledTile) *GUIStatus {
// Iterate over the current traces
var idx int
var corpus string
- for _, testTraces := range labeledTile.Traces {
+ for _, testTraces := range state.Tile.Traces {
for _, trace := range testTraces {
corpus = trace.Params[types.CORPUS_FIELD]
idx = len(trace.Labels) - 1
@@ -97,14 +97,14 @@ func (a *Analyzer) calcStatus(labeledTile *LabeledTile) *GUIStatus {
allUntriagedCount := 0
allPositiveCount := 0
allNegativeCount := 0
- for _, corpus := range a.currentIndex.corpora {
+ for _, corpus := range state.Index.corpora {
overallOk = overallOk && okByCorpus[corpus]
untriagedCount := len(byCorpus[corpus][types.UNTRIAGED])
positiveCount := len(byCorpus[corpus][types.POSITIVE])
negativeCount := len(byCorpus[corpus][types.NEGATIVE])
corpStatus[corpus] = &GUICorpusStatus{
OK: okByCorpus[corpus],
- MinCommitHash: labeledTile.Commits[minCommitId[corpus]].Hash,
+ MinCommitHash: state.Tile.Commits[minCommitId[corpus]].Hash,
UntriagedCount: untriagedCount,
NegativeCount: negativeCount,
}
« no previous file with comments | « golden/go/analysis/analysis_test.go ('k') | golden/go/analysis/triage.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698