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

Side by Side Diff: perf/go/skiaperf/main.go

Issue 777413002: Add new tests to presubmit, fix errors (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Run "go vet" once in the root dir 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
OLDNEW
1 package main 1 package main
2 2
3 import ( 3 import (
4 "encoding/json" 4 "encoding/json"
5 "flag" 5 "flag"
6 "fmt" 6 "fmt"
7 ehtml "html" 7 ehtml "html"
8 "html/template" 8 "html/template"
9 "math/rand" 9 "math/rand"
10 "net/http" 10 "net/http"
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 } 462 }
463 writeClusterSummaries(summary, w, r) 463 writeClusterSummaries(summary, w, r)
464 } 464 }
465 465
466 // getTile retrieves a tile from the disk 466 // getTile retrieves a tile from the disk
467 func getTile(tileScale, tileNumber int) (*types.Tile, error) { 467 func getTile(tileScale, tileNumber int) (*types.Tile, error) {
468 start := time.Now() 468 start := time.Now()
469 tile, err := nanoTileStore.Get(int(tileScale), int(tileNumber)) 469 tile, err := nanoTileStore.Get(int(tileScale), int(tileNumber))
470 glog.Infoln("Time for tile load: ", time.Since(start).Nanoseconds()) 470 glog.Infoln("Time for tile load: ", time.Since(start).Nanoseconds())
471 if err != nil || tile == nil { 471 if err != nil || tile == nil {
472 » » return nil, fmt.Errorf("Unable to get tile from tilestore: ", er r) 472 » » return nil, fmt.Errorf("Unable to get tile from tilestore: %s", err)
473 } 473 }
474 return tile, nil 474 return tile, nil
475 } 475 }
476 476
477 // tileHandler accepts URIs like /tiles/0/1 477 // tileHandler accepts URIs like /tiles/0/1
478 // where the URI format is /tiles/<tile-scale>/<tile-number> 478 // where the URI format is /tiles/<tile-scale>/<tile-number>
479 // 479 //
480 // It returns JSON of the form: 480 // It returns JSON of the form:
481 // 481 //
482 // { 482 // {
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 http.HandleFunc("/compare/", autogzip.HandleFunc(compareHandler)) 1100 http.HandleFunc("/compare/", autogzip.HandleFunc(compareHandler))
1101 http.HandleFunc("/calc/", autogzip.HandleFunc(calcHandler)) 1101 http.HandleFunc("/calc/", autogzip.HandleFunc(calcHandler))
1102 http.HandleFunc("/help/", autogzip.HandleFunc(helpHandler)) 1102 http.HandleFunc("/help/", autogzip.HandleFunc(helpHandler))
1103 http.HandleFunc("/oauth2callback/", login.OAuth2CallbackHandler) 1103 http.HandleFunc("/oauth2callback/", login.OAuth2CallbackHandler)
1104 http.HandleFunc("/logout/", login.LogoutHandler) 1104 http.HandleFunc("/logout/", login.LogoutHandler)
1105 http.HandleFunc("/loginstatus/", login.StatusHandler) 1105 http.HandleFunc("/loginstatus/", login.StatusHandler)
1106 1106
1107 glog.Infoln("Ready to serve.") 1107 glog.Infoln("Ready to serve.")
1108 glog.Fatal(http.ListenAndServe(*port, nil)) 1108 glog.Fatal(http.ListenAndServe(*port, nil))
1109 } 1109 }
OLDNEW
« no previous file with comments | « perf/go/shortcut/shortcut.go ('k') | perf/go/trybot/trybot.go » ('j') | run_unittests » ('J')

Powered by Google App Engine
This is Rietveld 408576698