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

Side by Side Diff: perf/go/ingester/ingester.go

Issue 777413002: Add new tests to presubmit, fix errors (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: rebase Created 6 years 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 unified diff | Download patch
« no previous file with comments | « perf/go/ingest/main.go ('k') | perf/go/ingester/ingester_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 package ingester 1 package ingester
2 2
3 import ( 3 import (
4 "fmt" 4 "fmt"
5 "io" 5 "io"
6 "net/http" 6 "net/http"
7 7
8 "time" 8 "time"
9 ) 9 )
10 10
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 return nil 163 return nil
164 } 164 }
165 165
166 // Flush writes the current Tile out, should be called once all updates are 166 // Flush writes the current Tile out, should be called once all updates are
167 // done. Note that Move() writes out the former Tile as it moves to a new Tile, 167 // done. Note that Move() writes out the former Tile as it moves to a new Tile,
168 // so this only needs to be called at the end of looping over a set of work. 168 // so this only needs to be called at the end of looping over a set of work.
169 func (tt TileTracker) Flush() { 169 func (tt TileTracker) Flush() {
170 glog.Info("Flushing Tile.") 170 glog.Info("Flushing Tile.")
171 if tt.lastTileNum != -1 { 171 if tt.lastTileNum != -1 {
172 if err := tt.tileStore.Put(0, tt.lastTileNum, tt.currentTile); e rr != nil { 172 if err := tt.tileStore.Put(0, tt.lastTileNum, tt.currentTile); e rr != nil {
173 » » » glog.Error("Failed to write Tile: %s", err) 173 » » » glog.Errorf("Failed to write Tile: %s", err)
174 } 174 }
175 } 175 }
176 } 176 }
177 177
178 // Tile returns the current Tile. 178 // Tile returns the current Tile.
179 func (tt TileTracker) Tile() *types.Tile { 179 func (tt TileTracker) Tile() *types.Tile {
180 return tt.currentTile 180 return tt.currentTile
181 } 181 }
182 182
183 // Offset returns the Value offset of a commit in a Trace. 183 // Offset returns the Value offset of a commit in a Trace.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 retval := []*ResultsFileLocation{} 362 retval := []*ResultsFileLocation{}
363 for _, dir := range dirs { 363 for _, dir := range dirs {
364 files, err := getFilesFromGSDir(dir, last, storage) 364 files, err := getFilesFromGSDir(dir, last, storage)
365 if err != nil { 365 if err != nil {
366 return nil, err 366 return nil, err
367 } 367 }
368 retval = append(retval, files...) 368 retval = append(retval, files...)
369 } 369 }
370 return retval, nil 370 return retval, nil
371 } 371 }
OLDNEW
« no previous file with comments | « perf/go/ingest/main.go ('k') | perf/go/ingester/ingester_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698