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

Side by Side Diff: perf/server/src/filetilestore/filestore.go

Issue 382313002: Adds tile handler to the perf server (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Removed comment Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « perf/server/src/config/config.go ('k') | perf/server/src/server/data.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 filetilestore 1 package filetilestore
2 2
3 import ( 3 import (
4 "encoding/gob" 4 "encoding/gob"
5 "fmt" 5 "fmt"
6 "os" 6 "os"
7 "path" 7 "path"
8 "path/filepath" 8 "path/filepath"
9 "sort" 9 "sort"
10 "strconv" 10 "strconv"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 return nil, err 84 return nil, err
85 } 85 }
86 f, err := os.Open(filename) 86 f, err := os.Open(filename)
87 if err != nil { 87 if err != nil {
88 return nil, fmt.Errorf("Failed to open tile %s for reading: %s", filename, err) 88 return nil, fmt.Errorf("Failed to open tile %s for reading: %s", filename, err)
89 } 89 }
90 defer f.Close() 90 defer f.Close()
91 t := types.NewTile() 91 t := types.NewTile()
92 dec := gob.NewDecoder(f) 92 dec := gob.NewDecoder(f)
93 if err := dec.Decode(t); err != nil { 93 if err := dec.Decode(t); err != nil {
94 » » return nil, fmt.Errorf("Failed to dencode tile %s: %s", filename , err) 94 » » return nil, fmt.Errorf("Failed to decode tile %s: %s", filename, err)
95 } 95 }
96 96
97 return t, nil 97 return t, nil
98 } 98 }
99 99
100 // NewFileTileStore creates a new TileStore that is back by the file system, 100 // NewFileTileStore creates a new TileStore that is backed by the file system,
101 // where dir is the directory name and datasetName is the name of the dataset. 101 // where dir is the directory name and datasetName is the name of the dataset.
102 func NewFileTileStore(dir, datasetName string) types.TileStore { 102 func NewFileTileStore(dir, datasetName string) types.TileStore {
103 return FileTileStore{ 103 return FileTileStore{
104 dir: dir, 104 dir: dir,
105 datasetName: datasetName, 105 datasetName: datasetName,
106 } 106 }
107 } 107 }
OLDNEW
« no previous file with comments | « perf/server/src/config/config.go ('k') | perf/server/src/server/data.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698