Skip to content

Commit

Permalink
Refactor report generation tool (#328)
Browse files Browse the repository at this point in the history
This is the first step towards making reports directly read/write to
both local disk and GCS.
  • Loading branch information
erfanio authored Jun 14, 2024
1 parent 0c006de commit 09d2235
Show file tree
Hide file tree
Showing 4 changed files with 404 additions and 401 deletions.
15 changes: 2 additions & 13 deletions report/upload_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,11 @@ fi
mkdir results-report

update_report() {
# Spin up the web server generating the report (and bg the process).
$PYTHON -m report.web "${RESULTS_DIR:?}" "${WEB_PORT:?}" "${BENCHMARK_SET:?}" "$MODEL" &
pid_web=$!
# Generate the report
$PYTHON -m report.web "${RESULTS_DIR:?}" "${BENCHMARK_SET:?}" "$MODEL" results-report

cd results-report || exit 1

# Recursively get all the experiment results.
echo "Download results from localhost."
wget2 --quiet --inet4-only --no-host-directories --http2-request-window 10 --recursive localhost:${WEB_PORT:?}/ 2>&1

# Also fetch index JSON.
wget2 --quiet --inet4-only localhost:${WEB_PORT:?}/json -O json 2>&1

# Stop the server.
kill -9 "$pid_web"

# Upload the report to GCS.
echo "Uploading the report."
BUCKET_PATH="gs://oss-fuzz-gcb-experiment-run-logs/Result-reports/${GCS_DIR:?}"
Expand Down
Loading

0 comments on commit 09d2235

Please sign in to comment.