-
Notifications
You must be signed in to change notification settings - Fork 3
/
runs.go
115 lines (109 loc) · 5.66 KB
/
runs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
package wpt
// Run represents the results of a run(s) performed by WPT
type Run struct {
FirstView RunResult `json:"firstView"`
RepeatView RunResult `json:"repeatView"`
}
// RunResult represents a single run and all the collected results
type RunResult struct {
URL string `json:"URL"`
LoadTime float64 `json:"loadTime"`
TTFB float64 `json:"TTFB"`
BytesOut float64 `json:"bytesOut"`
BytesOutDoc float64 `json:"bytesOutDoc"`
BytesIn float64 `json:"bytesIn"`
BytesInDoc float64 `json:"bytesInDoc"`
Connections float64 `json:"connections"`
Requests interface{} `json:"requests"`
RequestsDoc int `json:"requestsDoc"`
Responses200 int `json:"responses_200"`
Responses404 int `json:"responses_404"`
ResponsesOther int `json:"responses_other"`
Result int `json:"result"`
Render float64 `json:"render"`
FullyLoaded float64 `json:"fullyLoaded"`
Cached int `json:"cached"`
DocTime float64 `json:"docTime"`
DomTime float64 `json:"domTime"`
ScoreCache int `json:"score_cache"`
ScoreCDN int `json:"score_cdn"`
ScoreGzip int `json:"score_gzip"`
ScoreCookies int `json:"score_cookies"`
ScoreKeepAlive int `json:"score_keep-alive"`
ScoreMinify int `json:"score_minify"`
ScoreCombine int `json:"score_combine"`
ScoreCompress int `json:"score_compress"`
ScoreETags int `json:"score_etags"`
GzipTotal float64 `json:"gzip_total"`
GzipSaving float64 `json:"gzip_saving"`
MinifyTotal float64 `json:"minify_total"`
MinifySaving float64 `json:"minify_saving"`
ImageTotal float64 `json:"image_total"`
ImageSaving float64 `json:"image_saving"`
OptimizationChecked int `json:"optimization_checked"`
AFT int `json:"aft"`
DomElements int `json:"domElements"`
Title string `json:"title"`
TitleTime float64 `json:"titleTime"`
LoadEventStart float64 `json:"loadEventStart"`
LoadEventEnd float64 `json:"loadEventEnd"`
DomContentLoadedEventStart float64 `json:"domContentLoadedEventStart"`
DomContentLoadedEventEnd float64 `json:"domContentLoadedEventEnd"`
LastVisualChange float64 `json:"lastVisualChange"`
BrowserName string `json:"browser_name"`
BrowserVersion string `json:"browser_version"`
ServerCount int `json:"server_count"`
ServerRTT float64 `json:"server_rtt"`
BasePageCDN string `json:"base_page_cdn"`
AdultSite int `json:"adult_site"`
FixedViewport int `json:"fixed_viewport"`
ScoreProgressiveJPEG int `json:"score_progressive_jpeg"`
FirstPaint float64 `json:"firstPaint"`
DocCPUMS float64 `json:"docCPUms"`
FullyLoadedCPUMS float64 `json:"fullyLoadedCPUms"`
DocCPUPCT float64 `json:"docCPUpct"`
FullyLoadedDocCPUPCT float64 `json:"fullyLoadedCPUpct"`
IsResponsive int `json:"isResponsive"`
Date Timestamp `json:"date"`
SpeedIndex float64 `json:"SpeedIndex"`
VisualComplete float64 `json:"visualComplete"`
Run int `json:"run"`
EffectiveBPS float64 `json:"effectiveBps"`
EffectiveBPSDoc float64 `json:"effectiveBpsDoc"`
Tester string `json:"tester"`
AvgRun int `json:"avgRun"`
Pages RunPages `json:"pages"`
Thumbnails RunThumbnails `json:"thumbnails"`
Artifacts RunImages `json:"images"`
Images string `json:"Images"`
RawData RunRawData `json:"rawData"`
}
// RunPages represents the URLs for viewing the run data through the web interface
type RunPages struct {
Details string `json:"details"`
Checklist string `json:"checklist"`
Report string `json:"report"`
Breakdown string `json:"breakdown"`
Domains string `json:"domains"`
ScreenShot string `json:"screenShot"`
}
// RunThumbnails represents the URLs for thumbnail images for the run
type RunThumbnails struct {
Waterfall string `json:"waterfall"`
Checklist string `json:"checklist"`
ScreenShot string `json:"screenShot"`
}
// RunImages represents the URLs for viewing images related to the run
type RunImages struct {
Checklist string `json:"checklist"`
ConnectionView string `json:"connectionView"`
ScreenShot string `json:"screenShot"`
ScreenShotPNG string `json:"screenShotPng"`
Waterfall string `json:"waterfall"`
}
// RunRawData represents URLs for raw data on the run
type RunRawData struct {
Headers string `json:"headers"`
PageData string `json:"pageData"`
RequestsData string `json:"requestsData"`
}