Skip to content

Papercuts my agent reported #14

Closed
Closed

Description

@kurtextrem

Thanks for creating trace-engine-cli, I did a blind test between "investigate this trace" vs. "investigate this trace with trace-engine-cli" and it found more things (I would also have found) with the engine. That's really nice.

I asked my agent which papercuts it hit, also in comparison to other tools (https://github.com/TomerAberbach/profiler-md/, https://github.com/Conor-Hinchee/heap-analyzer, https://github.com/platformatic/flame). Versions: trace-engine-cli 0.2.0 (bundles @paulirish/trace_engine 0.0.65), Node 24.22.3, traces from Chrome 156. If you need traces for 1, 4, 5 I can DM them (but not make them public, sorry).

Blocking or misleading

  1. Browser-level traces are rejected. A trace started with Tracing.start on the browser CDP connection fails every command except scan with Error: No frames found in trace data. The cause is MetaHandler.js:168: TracingStartedInBrowser has no frame list. The message does not say that tracing must start on a page target.
  2. Out-of-process iframes are not covered. tasks, profile and the main-thread breakdown contained no URL from our cross-origin canvas frame, while network did list its requests. I found no flag to pick a process, thread or frame, and the README does not mention frames. This is inferred from the output, not read in the code.
  3. Missing trace categories give silent empty results. Without the loading category, shifts returns clusters: [], the same as "no shifts". Without CPU samples, every long task is RunTask > FunctionCall with null url. overview reports warnings: [] in both cases.
  4. mainThreadBreakdown changes meaning with CPU samples. For the same kind of page open, scriptingMs was 379 without samples and 8.72 with them, and systemMs went from 733 to 1,834.
  5. insights disagrees with overview. lcpBreakdown is all 0 / null and navigationId is null, while overview has an LCP of 1,029 ms. clsCulprits has culpritNodes: [] while shifts lists three culprits.

Smaller ones

  1. Long task rows name no JS function even with samples. They read RunTask > v8.callFunction, url null. I did not try --time-range per task to work around it.
  2. tasks --tree top-down returns two rows. They are RunTask and set 3073d6be115b6a24.
  3. tasks --tree bottom-up leads with native entries. The first 20 rows were RunTask, V8Console::runTask and v8::Debugger::AsyncTask*; app code needed --top 80. I found no option to show only frames with a URL.
  4. The bottom-up startTimeMs column is the trace start on every row.
  5. find only searches by function name. find --url <pattern> fails with Error: Missing required argument: function.
  6. network prints full URLs with query strings. Ours included a token; an option to drop query strings would help for output that goes into alerts.
  7. insights lists the page's own origin under thirdParties. Here that was framer4.localhost.
  8. Each command parses the trace again. On a 103 MB trace that is 5-6 s and 1.7-1.8 GB of memory per command, so about 21 s for overview, tasks, shifts and network. I did not find a way to get several analyses from one parse.
  9. Layout shift nodes have no identity. tagName, selector and debugName are null (Node #26). This may be a limit of saved traces rather than of the CLI.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions