-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.go
41 lines (34 loc) · 963 Bytes
/
model.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
package main
import (
vegeta "github.com/tsenart/vegeta/v12/lib"
"encoding/json"
)
type Stage struct {
Name string `json:"name"`
Target string `json:"target"`
Profile map[string]int64 `json:"profile"`
Steps []Step `json:"steps"`
}
type Step struct {
Duration uint64 `json:"duration"`
Rate int `json:"rate"`
}
type StageResult struct {
Name string `json:"name"`
StageSummary vegeta.Metrics `json:"stage_summary"`
Steps []StepResult `json:"steps"`
}
type StepResult struct {
StepSummary vegeta.Metrics `json:"step_summary"`
}
type RpcError struct {
Message string `json:"message"`
Code int `json:"code"`
Data string `json:"data,omitempty"`
}
type RpcResponse struct {
Id json.RawMessage `json:"id"`
Jsonrpc string `json:"jsonrpc"`
Result json.RawMessage `json:"result,omitempty"`
Error *RpcError `json:"error,omitempty"`
}