tree: 0abf00b3d7bc34a2d6abf461b0f280698819825c
  1. app/
  2. cmd/
  3. logstore/
  4. ninjalog/
  5. Makefile
  6. OWNERS
  7. 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

Update BigQuery schema

The schema of the BigQuery table is managed by terraform. Please update the schema in this file. The change will be enforced automatically.

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