chromium_build_stats/

directory
v0.0.0-...-7220889 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: BSD-3-Clause

README

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

Directories

Path Synopsis
Package app implements chromium-build-stats.appspot.com services.
Package app implements chromium-build-stats.appspot.com services.
cmd
Package logstore provides an access to storage of ninja_log.
Package logstore provides an access to storage of ninja_log.
Package ninjalog provides ninja_log parser
Package ninjalog provides ninja_log parser
assets
Package assets is generated by go.chromium.org/luci/tools/cmd/assets.
Package assets is generated by go.chromium.org/luci/tools/cmd/assets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL