Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding time to total-data.json and lap-data.json #60

Merged
merged 8 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion scripts/add-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ LABEL=""
CPU=""
ENERGY=""
POWER=""
TIME=""

# Parse named parameters
while [[ $# -gt 0 ]]; do
Expand Down Expand Up @@ -37,6 +38,11 @@ while [[ $# -gt 0 ]]; do
shift # past argument
shift # past value
;;
-t|--time)
TIME="$2"
shift # past argument
shift # past value
;;
*) # unknown option
echo "Unknown option: $1"
exit 1
Expand All @@ -55,7 +61,8 @@ NEW_STEP=$(cat <<EOM
"label": "$LABEL",
"cpu_avg_percent": "$CPU",
"energy_joules": "$ENERGY",
"power_avg_watts": "$POWER"
"power_avg_watts": "$POWER",
"time": "$TIME"
}
EOM
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/display_results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function display_results {
echo "show create-and-add-meta.sh output"
echo "--file $total_data_file --repository $repo_enc --branch $branch_enc --workflow $WORKFLOW_ID --run_id $run_id_enc"
source "$(dirname "$0")/create-and-add-meta.sh" --file "${total_data_file}" --repository "${repo_enc}" --branch "${branch_enc}" --workflow "$WORKFLOW_ID" --run_id "${run_id_enc}"
source "$(dirname "$0")/add-data.sh" --file "${total_data_file}" --label "TOTAL" --cpu "${cpu_avg}" --energy "${total_energy}" --power "${power_avg}"
source "$(dirname "$0")/add-data.sh" --file "${total_data_file}" --label "TOTAL" --cpu "${cpu_avg}" --energy "${total_energy}" --power "${power_avg}" --time "${time}"

}

Expand Down
2 changes: 1 addition & 1 deletion scripts/make_measurement.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function make_measurement() {
echo "--file $lap_data_file --repository $repo_enc --branch $branch_enc --workflow $WORKFLOW_ID --run_id $run_id_enc"

source "$(dirname "$0")/create-and-add-meta.sh" --file "${lap_data_file}" --repository "${repo_enc}" --branch "${branch_enc}" --workflow "$WORKFLOW_ID" --run_id "${run_id_enc}"
source "$(dirname "$0")/add-data.sh" --file "${lap_data_file}" --label "$label" --cpu "${cpu_avg}" --energy "${total_energy}" --power "${power_avg}"
source "$(dirname "$0")/add-data.sh" --file "${lap_data_file}" --label "$label" --cpu "${cpu_avg}" --energy "${total_energy}" --power "${power_avg}" --time "${time}"

killall -9 -q /tmp/eco-ci/demo-reporter || true
/tmp/eco-ci/demo-reporter | tee -a /tmp/eco-ci/cpu-util-total.txt > /tmp/eco-ci/cpu-util.txt &
Expand Down
Loading