lighthouse/proto
Adriana Ixba 629f5e7a80
clients(lr): include flag for ignoring bad page status code (#15764)
2024-01-16 15:46:12 -08:00
..
scripts misc: rename lighthouse-(core,cli) folders (#14242) 2022-07-29 13:55:41 -07:00
README.md docs(proto): update protobuf installation guidance (#14558) 2022-11-28 11:57:03 -08:00
lighthouse-result.proto clients(lr): include flag for ignoring bad page status code (#15764) 2024-01-16 15:46:12 -08:00

README.md

How to compile protos + use locally

You'll need to have v3.20+ of protobuf.

Note that they changed the versioning scheme and went from 3.20.1 to 4.21.0. Making it more confusing, in brew and Github, 4.21.x is shown as v21.x.

  1. Install the proto compiler with brew install protobuf, or something like this.
  2. Run yarn test-proto

Proto Resources

LHR Round Trip Flow

LHR round trip flow:
    (Compiling the Proto)
    lighthouse_result.proto -> protoc --python_out ... -> lighthouse_result.pb2
                                                                  ⭏
                                                               (used by)
    (Making a Round Trip JSON)                                     ⭏
    lhr.json --> proto_preprocessor.js -> lhr_processed.json -> json_roundtrip_via_proto.py -> lhr.round_trip.json

Hacking Hints

  • Clean out compiled proto and json with yarn clean
  • Round trips might jumble the order of your JSON keys and lists!