workload: fix and rename benchmark script
Benchmark script uploaded by the custom_image is installing a benchmark and should be named accordingly. Also, fix the size of the read benchmark. Change-Id: Id75db4b06acfa04145feb3bf07ea6a9c91b03d9f Closes-Bug: #1502838
This commit is contained in:
parent
158149cf35
commit
73e69966f1
24
rally-jobs/extra/install_benchmark.sh
Normal file
24
rally-jobs/extra/install_benchmark.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
main() {
|
||||
cat > ~/dd_test.sh <<'EOF'
|
||||
#!/bin/sh
|
||||
time_seconds(){ (time -p $1 ) 2>&1 |awk '/real/{print $2}'; }
|
||||
file=/tmp/test.img
|
||||
c=1000 #1GB
|
||||
write_seq_1gb=$(time_seconds "dd if=/dev/zero of=$file bs=1M count=$c")
|
||||
read_seq_1gb=$(time_seconds "dd if=$file of=/dev/null bs=1M count=$c")
|
||||
[ -f $file ] && rm $file
|
||||
|
||||
echo "{
|
||||
\"write_seq_1gb\": $write_seq_1gb,
|
||||
\"read_seq_1gb\": $read_seq_1gb
|
||||
}"
|
||||
EOF
|
||||
|
||||
chmod a+x ~/dd_test.sh
|
||||
}
|
||||
|
||||
main
|
@ -603,8 +603,8 @@
|
||||
context:
|
||||
image_command_customizer:
|
||||
command:
|
||||
local_path: "/home/jenkins/.rally/extra/script_benchmark.sh"
|
||||
remote_path: "./script_benchmark.sh"
|
||||
local_path: "/home/jenkins/.rally/extra/install_benchmark.sh"
|
||||
remote_path: "./install_benchmark.sh"
|
||||
flavor:
|
||||
name: "m1.tiny"
|
||||
image:
|
||||
|
@ -199,7 +199,7 @@ class VMTasks(vm_utils.VMScenario):
|
||||
def boot_runcommand_delete_custom_image(self, **kwargs):
|
||||
"""Boot a server from a custom image, run a command that outputs JSON.
|
||||
|
||||
Example Script in rally-jobs/extra/script_benchmark.sh
|
||||
Example Script in rally-jobs/extra/install_benchmark.sh
|
||||
"""
|
||||
|
||||
return self.boot_runcommand_delete(
|
||||
|
Loading…
Reference in New Issue
Block a user