xai-org/grok-build · warning
no timing events found in {:?}
Error message
no timing events found in {:?} What it means
generate_chrome_trace parses each line of the instrumentation log for timing events; if the whole file yields zero parseable timing events (counter `seen == 0`), it errors because an empty Chrome trace would be useless. This is a validation error, not an I/O error — the file was readable but contained no usable timing data.
Source
Thrown at crates/codegen/xai-grok-telemetry/src/instrumentation.rs:494
.unwrap_or(0);
let trace_event = serde_json::json!({
"name": name,
"cat": "instrumentation",
"ph": "X",
"ts": start_us,
"dur": dur_us,
"pid": 1,
"tid": thread_id,
"args": Value::Object(args),
});
events.push(trace_event);
seen += 1;
}
if seen == 0 {
return Err(anyhow!("no timing events found in {:?}", input));
}
let trace = serde_json::json!({
"displayTimeUnit": "ms",
"traceEvents": events,
});
let mut output_file = std::fs::File::create(&output)
.map_err(|err| anyhow!("failed to create chrome trace {:?}: {}", output, err))?;
serde_json::to_writer_pretty(&mut output_file, &trace)
.map_err(|err| anyhow!("failed to write chrome trace: {}", err))?;
Ok(output)
}
pub fn finalize() -> Result<()> {
let mode = mode();
if mode == InstrumentationMode::Disabled {View on GitHub (pinned to bc7f02eddd)
Solutions
- Confirm the app actually ran instrumented/timed operations between instrumentation start and log capture
- Check the log is non-empty and contains timing records (`wc -l`, inspect first lines)
- Regenerate the instrumentation log with the same binary version that parses it
- Verify the parser's event-matching logic covers the event types your app emits
Example fix
// before
if seen == 0 {
return Err(anyhow!("no timing events found in {:?}", input));
}
// after
if seen == 0 {
eprintln!("warning: no timing events found in {:?}; emitting empty trace", input);
}
let trace = serde_json::json!({ "traceEvents": events }); Defensive patterns
Strategy: validation
Validate before calling
let has_events = std::fs::read_to_string(&input)?
.lines()
.any(|l| l.contains("\"ts\"") || l.contains("ph"));
if !has_events { eprintln!("log contains no timing events; run instrumented workloads first"); } Try / catch
match generate_chrome_trace(opts) {
Err(e) if e.to_string().contains("no timing events found") => {
eprintln!("nothing to trace; ensure instrumented operations ran before generating");
}
other => other,
} Prevention
- Run timed/instrumented operations before generating a trace
- Check the log is non-empty and expected format before parsing
- Keep log writer and trace parser on compatible versions
- Detect and warn on truncated/rotated logs
When it happens
Trigger: Calling generate_chrome_trace against an instrumentation log that is empty, contains only non-timing lines, or whose event format does not match the parser's expected timing-event shape.
Common situations: Instrumentation started but no timed operations ran before the trace was generated; the log was rotated/truncated; a version mismatch where the log was written by a different format than the parser expects.
Related errors
- failed to open instrumentation log {:?}: {}
- invalid worktree id from dest: {worktree_id}
- invalid worktree id {:?}
- invalid {GROK_CHAT_LOCAL_WORKSPACE_MODE_ENV}={other:?}; expe
- Error: --session-id must be a valid UUID (got '{session_id}'
AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31).
Data as JSON: /api/errors/db755f1f7bc0af22.
Report an issue: GitHub.