Proposal: `compare` command for two traces

Ouverte
#10 2 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
15/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
typescript
Domaine
cli, performance

Piste de recherche

This is a design proposal, not a ready change: the open questions on noise, the compare vs diff naming, and whether the command belongs in the CLI at all are unresolved. Before writing code, read the existing diff command and its aggregation of self time, plus the overview output it would reuse. Done means the maintainers have settled scope and naming, and a first version comparing one pair of traces is agreed on.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Follow-up to #9.

Use case

Check the impact of a change: record a trace on main and another on a PR branch, and see what changed. Today you run overview and other commands on both traces and compare the output by hand, or ask an agent to do it, which costs tokens and is easy to get wrong.

Sketch

trace-engine-cli compare baseline.json.gz candidate.json.gz

The output would include:

  • Core Web Vitals per metric: baseline, candidate, delta and rating change (for example good → needs-improvement).
  • Main thread busy time (total minus idle) per category. Idle is left out because two recordings rarely have the same length.
  • Long task count and blocking time (sum of dur - 50ms), named blockingMs so it is not confused with Lighthouse TBT.
  • Top function regressions by self time, reusing the aggregation in diff.
  • A warning if the main URLs differ.
Open questions
  • Noise: one trace per side gives noisy CWV deltas. A first version could compare a single pair and focus on rating changes. A later version could accept several traces per side and compare medians.
  • Naming: diff compares two windows in one trace, and compare would compare two traces. The names could be confusing.
  • Scope: does this belong in this CLI, or is it better left to the agent (run overview on both traces and compare)?

What are your main concerns about it?

Langage dominant
TypeScript
Étoiles
15
Forks
4
Merge moyen
1 j 17 h
PR mergées (30 j)
22

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de ChromeDevTools/trace-engine-cli

Toutes les issues de ChromeDevTools/trace-engine-cli

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.