fix: address review feedback (#95)
- Fix curl -w override bug: consolidate --write-out/"-w" into single
-w "%{http_code} %{time_total}" so STATUS and TIMING are both captured
- Add ?nocache=1 to render URL so baseline measures cold render time
- Fix duplicate BASELINE.md Section 2 rows (batting vs pitching)
- Add benchmarks/render_timings.txt to .gitignore
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4f2a66b67e
commit
2ab6e71735
3
.gitignore
vendored
3
.gitignore
vendored
@ -83,3 +83,6 @@ postgres_data/
|
||||
README_GAUNTLET_CLEANUP.md
|
||||
wipe_gauntlet_team.py
|
||||
SCHEMA.md
|
||||
|
||||
# Benchmark output files
|
||||
benchmarks/render_timings.txt
|
||||
|
||||
@ -70,8 +70,8 @@ echo "Elapsed: $(( (END - START) / 1000 )).$(( (END - START) % 1000 ))s"
|
||||
|
||||
| Environment | Cards | Elapsed (s) | Per-card avg (s) |
|
||||
|-------------|-------|-------------|-----------------|
|
||||
| dev | 20 | _TBD_ | _TBD_ |
|
||||
| dev | 20 | _TBD_ | _TBD_ |
|
||||
| dev (batting) | 20 | _TBD_ | _TBD_ |
|
||||
| dev (pitching) | 20 | _TBD_ | _TBD_ |
|
||||
|
||||
> **Note:** Run the upload command in the `card-creation` repo and record timings here.
|
||||
|
||||
|
||||
@ -48,13 +48,9 @@ TOTAL=0
|
||||
COUNT=0
|
||||
|
||||
for player_id in "${PLAYER_IDS[@]}"; do
|
||||
URL="$API_BASE/api/v2/players/$player_id/${CARD_TYPE}card"
|
||||
# Bypass cached PNG files by adding ?nocache=1 (treated as unknown param, triggers re-render)
|
||||
# Remove this flag after baseline is captured to test cache-hit performance separately.
|
||||
HTTP_CODE=$(curl -s -o /dev/null \
|
||||
--write-out "%{http_code}" \
|
||||
-w " %{time_total}" \
|
||||
"$URL" 2>&1)
|
||||
# Bypass cached PNG files; remove ?nocache=1 after baseline is captured to test cache-hit performance.
|
||||
URL="$API_BASE/api/v2/players/$player_id/${CARD_TYPE}card?nocache=1"
|
||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code} %{time_total}" "$URL" 2>&1)
|
||||
STATUS=$(echo "$HTTP_CODE" | awk '{print $1}')
|
||||
TIMING=$(echo "$HTTP_CODE" | awk '{print $2}')
|
||||
echo " player_id=$player_id http=$STATUS time=${TIMING}s" | tee -a "$OUTFILE"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user