-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(validator): load validations from validations.yaml
This commit is rewrite of existing validator. Changes include * remove queries.json in favour of validations.yaml * move prometheus job names - metal and vm under `prometheus` field * Simplify parsing queries making it testable * Add gen-report command to regenerate reports * Add logging that can be controlled by `log_level` in validator.yaml * Fix use of hard-coded ssh-key to generate VM specs * Fixes tests Signed-off-by: Sunil Thaha <[email protected]>
- Loading branch information
Showing
20 changed files
with
1,095 additions
and
659 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
__pycache__ | ||
validator.yaml | ||
tmp/ |
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 was deleted.
Oops, something went wrong.
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 @@ | ||
line-length = 120 |
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 |
---|---|---|
@@ -1,30 +1,43 @@ | ||
#!/bin/bash | ||
|
||
# warm up system by waiting for 40 seconds | ||
# idle | ||
stress-ng --cpu $(nproc) --cpu-load 0 --timeout 10s | ||
|
||
# # Stress at 10% load for 20 seconds | ||
# stress-ng --cpu $(nproc) --cpu-load 10 --timeout 20s | ||
# | ||
# # Stress at 25% load for 20 seconds | ||
# stress-ng --cpu $(nproc) --cpu-load 25 --timeout 20s | ||
# | ||
# # Stress at 50% load for 20 seconds | ||
# stress-ng --cpu $(nproc) --cpu-load 50 --timeout 20s | ||
# | ||
# Stress at 75% load for 10 seconds | ||
stress-ng --cpu $(nproc) --cpu-load 75 --timeout 20s | ||
# | ||
# # Stress at 50% load for 20 seconds | ||
# stress-ng --cpu $(nproc) --cpu-load 50 --timeout 20s | ||
# | ||
# # Stress at 25% load for 20 seconds | ||
# stress-ng --cpu $(nproc) --cpu-load 25 --timeout 20s | ||
# | ||
# # Stress at 10% load for 20 seconds | ||
# stress-ng --cpu $(nproc) --cpu-load 10 --timeout 20s | ||
|
||
# cool off for 40 seconds | ||
# idle | ||
stress-ng --cpu $(nproc) --cpu-load 0 --timeout 10s | ||
#!/usr/bin/env bash | ||
|
||
set -eu -o pipefail | ||
|
||
trap exit_all INT | ||
exit_all() { | ||
pkill -P $$ | ||
} | ||
|
||
run() { | ||
echo "❯ $*" | ||
"$@" | ||
echo " ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾" | ||
} | ||
|
||
main() { | ||
|
||
local cpus | ||
cpus=$(nproc) | ||
|
||
# load and time | ||
local -a load_curve=( | ||
0:5 | ||
10:20 | ||
25:20 | ||
50:20 | ||
75:20 | ||
100:30 | ||
75:20 | ||
50:20 | ||
25:20 | ||
10:20 | ||
0:5 | ||
) | ||
|
||
for x in "${load_curve[@]}"; do | ||
local load="${x%%:*}" | ||
local time="${x##*:}s" | ||
run stress-ng --cpu "$cpus" --cpu-load "$load" --timeout "$time" | ||
done | ||
} | ||
|
||
main "$@" |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.