Skip to content

Fix viewer auto-load, .jsonl support, and filter out coz.h experiments#268

Merged
emeryberger merged 1 commit intomasterfrom
fix-viewer-jsonl-autoload
Feb 16, 2026
Merged

Fix viewer auto-load, .jsonl support, and filter out coz.h experiments#268
emeryberger merged 1 commit intomasterfrom
fix-viewer-jsonl-autoload

Conversation

@emeryberger
Copy link
Copy Markdown
Member

@emeryberger emeryberger commented Feb 16, 2026

Summary

  • Profile emitter: Skip coz.h lines when selecting experiments so instrumentation overhead is never profiled or emitted (handles both / and \ path separators for future Windows portability)
  • Server-side filter: Replace broken line-by-line /coz.h: filter that removed experiment lines but left orphaned throughput_point lines (crashing the JS Profile constructor with a null reference). New filter properly skips both experiment and subsequent data point lines as a pair
  • Viewer UI: Accept .jsonl files in file inputs, drag-and-drop, and validation. Call checkAutoLoad() directly instead of waiting for DOMContentLoaded. Add client-side coz.h filtering as safety net for manual uploads

Test plan

  • Build profiler (make succeeds)
  • Run toy benchmark — zero coz.h lines in output, correct ~50% speedup on line 18
  • coz plot --text shows clean results
  • Server-side filter produces properly paired experiment/data-point output
  • Viewer page loads via ?load= auto-load mechanism
  • Test .jsonl drag-and-drop upload in browser
  • Test .jsonl file picker upload in browser

🤖 Generated with Claude Code

Three related fixes for the coz plot viewer:

1. Profile emitter: skip coz.h lines when selecting experiments, so
   instrumentation overhead is never profiled or emitted.

2. Server-side filter: the old line-by-line '/coz.h:' filter removed
   experiment lines but left orphaned throughput_point lines, causing
   the JS Profile constructor to crash (null experiment reference).
   Replaced with a paired filter that skips both the experiment and
   its subsequent data points.

3. Viewer UI: accept .jsonl files in file inputs, drag-and-drop, and
   validation. Call checkAutoLoad() directly instead of waiting for
   DOMContentLoaded (scripts are at bottom of body, DOM is ready).
   Add client-side coz.h filtering as a safety net for manual uploads.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@emeryberger emeryberger merged commit eacb5a7 into master Feb 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant