-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Status codes make map before adding data Update examples Bump hloader Support multi-parch hloader Signed-off-by: Raul Sevilla <[email protected]>
- Loading branch information
1 parent
ce598f8
commit 353b12e
Showing
9 changed files
with
167 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# vim: expandtab shiftwidth=2 softtabstop=2 | ||
|
||
# First sample is set as warmup and also will tune the default ingress-controller to place the routers on infra nodes | ||
- termination: http | ||
connections: 20 | ||
samples: 1 | ||
duration: 1m | ||
path: /1024.html | ||
concurrency: 1 | ||
tool: hloader | ||
serverReplicas: 90 | ||
requestTimeout: 10s | ||
tuningPatch: '{"spec":{"tuningOptions": {"threadCount": 8}, "nodePlacement": {"nodeSelector": {"matchLabels": {"node-role.kubernetes.io/infra": ""}}}, "replicas": 2}}' | ||
warmup: true | ||
|
||
- termination: http | ||
connections: 200 | ||
samples: 2 | ||
duration: 2m | ||
path: /1024.html | ||
concurrency: 1 | ||
tool: hloader | ||
serverReplicas: 90 | ||
delay: 10s | ||
requestTimeout: 10s | ||
procs: 2 | ||
|
||
- termination: edge | ||
connections: 200 | ||
samples: 2 | ||
duration: 2m | ||
path: /1024.html | ||
concurrency: 1 | ||
tool: hloader | ||
serverReplicas: 90 | ||
delay: 10s | ||
requestTimeout: 10s | ||
procs: 2 | ||
|
||
- termination: reencrypt | ||
connections: 200 | ||
samples: 2 | ||
duration: 2m | ||
path: /1024.html | ||
concurrency: 1 | ||
tool: hloader | ||
serverReplicas: 90 | ||
delay: 10s | ||
requestTimeout: 10s | ||
procs: 2 | ||
|
||
- termination: passthrough | ||
connections: 200 | ||
samples: 2 | ||
duration: 2m | ||
path: /1024.html | ||
concurrency: 1 | ||
tool: hloader | ||
serverReplicas: 90 | ||
delay: 10s | ||
requestTimeout: 10s | ||
procs: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright 2023 The ingress-perf Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package tools | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
"strconv" | ||
|
||
"github.com/cloud-bulldozer/ingress-perf/pkg/config" | ||
) | ||
|
||
type hLoader struct { | ||
cmd []string | ||
res PodResult | ||
} | ||
|
||
func init() { | ||
toolMap["hloader"] = HLoader | ||
} | ||
|
||
func HLoader(cfg config.Config, ep string) Tool { | ||
newHLoader := &hLoader{ | ||
cmd: []string{"hloader", "-u", ep, | ||
"-c", strconv.Itoa(cfg.Connections), | ||
"-d", fmt.Sprint(cfg.Duration), | ||
"-r", strconv.Itoa(cfg.RequestRate), | ||
"-t", fmt.Sprint(cfg.RequestTimeout), | ||
fmt.Sprintf("--keepalive=%v", cfg.Keepalive), | ||
fmt.Sprintf("--http2=%v", cfg.HTTP2), | ||
}, | ||
res: PodResult{}, | ||
} | ||
return newHLoader | ||
} | ||
|
||
func (w *hLoader) Cmd() []string { | ||
return w.cmd | ||
} | ||
|
||
func (w *hLoader) ParseResult(stdout, _ string) (PodResult, error) { | ||
return w.res, json.Unmarshal([]byte(stdout), &w.res) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters