X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=doc%2Fexamples%2Ftrigger-on-event%2Fperformance%2Fgenerate-data.sh;fp=doc%2Fexamples%2Ftrigger-on-event%2Fperformance%2Fgenerate-data.sh;h=58065a57d41fb92cecd17f19666237beda6b94aa;hp=0000000000000000000000000000000000000000;hb=2463b7879c00298daa79744cdaae82ac061a4ed8;hpb=3a4595c2469472dee1656cde5f8882c2123efd3c diff --git a/doc/examples/trigger-on-event/performance/generate-data.sh b/doc/examples/trigger-on-event/performance/generate-data.sh new file mode 100755 index 000000000..58065a57d --- /dev/null +++ b/doc/examples/trigger-on-event/performance/generate-data.sh @@ -0,0 +1,50 @@ +#!/bin/bash -x +# +# Copyright (C) 2020 Jonathan Rajotte-Julien +# +# SPDX-License-Identifier: MIT + +cpu_stressor=$(nproc) + +while read -r load delay count; do + stress-ng --cpu-load "$load" --cpu "$cpu_stressor" & + stress_ng_id=$! + + # Let the workload stabilize + sleep 5 + + ./perform-experience.sh 0 "${load}_cpuload_${delay}ms" "$delay" "$count" + kill "$stress_ng_id" + wait +done << EOF +0 1 10000 +25 1 10000 +50 1 10000 +75 1 10000 +100 1 10000 +0 10 5000 +25 10 5000 +50 10 5000 +75 10 5000 +100 10 5000 +0 100 6000 +25 100 6000 +50 100 6000 +75 100 6000 +100 100 6000 +0 1000 6000 +25 1000 6000 +50 1000 6000 +75 1000 6000 +100 1000 6000 +0 10000 600 +25 10000 600 +50 10000 600 +75 10000 600 +100 10000 600 +0 60000 100 +25 60000 100 +50 60000 100 +75 60000 100 +100 60000 60 +EOF