tree: 01b3e2485e4410437f7919ce53f549b5c8d7922c [path history] [tgz]
  1. app/
  2. cmd/
  3. compilerproxylog/
  4. logstore/
  5. ninjalog/
  6. Makefile
  7. OWNERS
  8. README.md
go/src/infra/appengine/chromium_build_stats/README.md

This is an application designed to collect and analyze build/compile stats.

go/cbs-doc

Deign Doc: Chromium build time profiler

How to:

See infra/go/README.md for preparation.

to compile

  $ make build

to deploy to production

  $ make deploy-prod

to run test

  $ make test

Operation for BigQuery Table

Setup

  1. Make Dataset
$ bq --project_id=$PROJECT mk ninjalog
  1. Update BigQuery table config/schema.
$ make update-staging # for staging
$ make update-prod # for prod

ninja log upload from user

Ninja log is uploaded from user too. Upload script is located in depot_tools.

example query

link to query editor

  1. Find time consuming build tasks in a day per target_os, build os and outputs
SELECT
  (
  SELECT
    value
  FROM
    UNNEST(build_configs)
  WHERE
    key = "target_os") target_os,
  os,
  SUBSTR(ARRAY_TO_STRING(outputs, ", "), 0, 128) outputs,
  ROUND(AVG(end_duration_sec - start_duration_sec), 2) task_duration_avg,
  ROUND(SUM(end_duration_sec - start_duration_sec), 2) task_duration_sum,
  ROUND(SUM(weighted_duration_sec), 2) weighted_duration_sum,
  COUNT(1) cnt
FROM
  `chromium-build-stats.ninjalog.users`, UNNEST(log_entries)
WHERE
  created_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 DAY)
GROUP BY
  target_os,
  os,
  outputs
ORDER BY
  weighted_duration_sum DESC