Clone this repo:

Branches

  1. d94e253 Removing more unused java imports by Mohamed Heikal · 9 weeks ago master
  2. eada3bb Fix errorprone warnings + fix help link by Mohamed Heikal · 9 weeks ago
  3. fb371cd Fix README.md to reflect the existance of config file by Mohamed Heikal · 2 months ago
  4. 7c12a5f Merge "plugin now requests config from gerrit" by Mohamed Heikal · 2 months ago
  5. 6676692 plugin now requests config from gerrit by Mohamed Heikal · 2 months ago

Chromium Binary Size Plugin for Gerrit

How it works

The plugin queries the android-binary-size trybot for the current patchset on Gerrit, and gets the binary_size_plugin property. This property contains the metadata about the binary size metrics affected by the patchset in question. It then shows an inline table with the metric deltas + links to SuperSize output.

Usage

This plugin is configured via the chromium-binary-size.config file present in the repo‘s refs/meta/config ref, as well as the same file in all repositories in the repo’s inheritance chain (up to and including All-Projects).

An example chromium-binary-size.config is below (this enables the plugin on the chromium/src repo using the android-binary-size trybot:

[host]
  gerrit = "chromium-review.googlesource.com"

[repo "chromium/src"]
  builder = "android-binary-size"
  bucket = "try"
  project = "chromium"

All changes to chromium-binary-size.config files are instantly reflected. There is no caching period or need to restart the server.

Development

git clone --recursive https://gerrit.googlesource.com/gerrit
cd gerrit/plugins

git clone https://chromium.googlesource.com/infra/gerrit-plugins/chromium-binary-size
cd chromium-binary-size

Run the polygerrit-ui server against live data

Use the script run-with-prod-data.sh (based on polygerrit-ui/run-server.sh). You may change some paths by setting environment variables, for example:

GERRIT_DIR="$HOME/gerrit" ./run-with-prod-data.sh

Testing

# Install dependencies.
npm install -g bower
npm install -g web-component-tester
bower install
wct