Skip to content

Commit

Permalink
Status codes
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 committed Oct 25, 2023
1 parent 6b1fdc4 commit 07037a4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion containers/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ FROM registry.access.redhat.com/ubi8/ubi:latest
RUN dnf install -y iproute procps-ng
COPY --from=builder /wrk/wrk /usr/bin/wrk
COPY json.lua json.lua
COPY hloader /usr/bin/hloader
RUN curl -L -sS https://github.com/rsevilla87/hloader/releases/download/v0.1.0/hloader-Linux-v0.1.0-x86_64.tar.gz | tar xz -C /usr/bin/
3 changes: 3 additions & 0 deletions pkg/runner/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ func genResultSummary(result *tools.Result) {
result.P90Latency += pod.P90Latency
result.P95Latency += pod.P95Latency
result.P99Latency += pod.P99Latency
for code, count := range pod.StatusCodes {
result.StatusCodes[code] += count
}
}
pods := float64(len(result.Pods))
result.StdevRps = result.StdevRps / pods
Expand Down
4 changes: 2 additions & 2 deletions pkg/runner/tools/hloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ func HLoader(cfg config.Config, ep string) Tool {
"-d", fmt.Sprint(cfg.Duration),
"-r", strconv.Itoa(cfg.RequestRate),
"-t", fmt.Sprint(cfg.RequestTimeout),
"-k", strconv.FormatBool(cfg.Keepalive),
"--http2", strconv.FormatBool(cfg.HTTP2),
fmt.Sprintf("--keepalive=%v", cfg.Keepalive),
fmt.Sprintf("--http2=%v", cfg.HTTP2),
},
res: PodResult{},
}
Expand Down
1 change: 1 addition & 0 deletions pkg/runner/tools/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@ type Result struct {
Requests int64 `json:"requests"`
Timeouts int64 `json:"timeouts"`
Version string `json:"version"`
StatusCodes map[int]int64 `json:"status_codes"`
ClusterMetadata
}

0 comments on commit 07037a4

Please sign in to comment.