lighthouse/proto
Shane Exterkamp 51d204762e core: change displayValue to be string only (#6767) 2018-12-18 10:19:11 -08:00
..
scripts core(proto): add proto definition for LHR (#6183) 2018-10-16 12:00:24 -07:00
README.md misc: simplify proto npm scripts (#6406) 2018-10-26 14:55:30 -07:00
lighthouse-result.proto misc: rename typings/ to types/ (#6617) 2018-11-20 14:58:21 -08:00
sample_v2_round_trip.json core: change displayValue to be string only (#6767) 2018-12-18 10:19:11 -08:00

README.md

How to compile protos + use locally

  1. Install the proto compiler
    1. Manual install
      1. Get the latest proto release (select one with python included if you want to run this validator)
      2. Install the C++ Protocol Buffer Runtime
    2. Brew install
      1. brew install protobuf
  2. Run yarn compile-proto then yarn build-proto-roundtrip

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!
  • Is your six installation troubling your pip install protobuf? Mine did. Try pip install --ignore-installed six.