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

Unified Diff: perf/server/src/types/types.go

Issue 382313002: Adds tile handler to the perf server (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: More style fixes 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 side-by-side diff with in-line comments
Download patch
« perf/server/src/server/perf.go ('K') | « perf/server/src/server/perf.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: perf/server/src/types/types.go
diff --git a/perf/server/src/types/types.go b/perf/server/src/types/types.go
index 5a8bc429c3e2042e8e0a82ec99c14ab981da82f6..599e1b81b5f18c359213a994abda7c2a60b01011 100644
--- a/perf/server/src/types/types.go
+++ b/perf/server/src/types/types.go
@@ -86,6 +86,32 @@ func NewTile() *Tile {
}
}
+// TraceGUI is used in the JSON returned from the tile handler.
jcgregorio 2014/07/11 20:36:50 // used in TileGUI.
kelvinly 2014/07/11 20:51:58 Done.
+type TraceGUI struct {
+ Data [][2]float64 `json:"data"`
+ Key string `json:"key"`
+}
+
+// TileGUI is the JSON the server serves for tile requests.
+type TileGUI struct {
+ Traces []TraceGUI `json:"traces,omitempty"`
+ ParamSet [][]string `json:"params,omitempty"`
+ Commits []*Commit `json:"commits,omitempty"`
+ NameList []string `json:"names,omitempty"`
+ Scale int `json:"scale"`
+ TileIndex int `json:"tileIndex"`
+}
+
+func NewGUITile(scale int, tileIndex int) *TileGUI {
+ return &TileGUI{
+ Traces: make([]TraceGUI, 0),
+ ParamSet: make([][]string, 0),
+ Commits: make([]*Commit, 0),
+ Scale: scale,
+ TileIndex: tileIndex,
+ }
+}
+
// TileStore is an interface representing the ability to save and restore Tiles.
type TileStore interface {
Put(scale, index int, tile *Tile) error
« perf/server/src/server/perf.go ('K') | « perf/server/src/server/perf.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698