Coder Social home page Coder Social logo

mmcloughlin / goperf Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 0.0 8.39 MB

Continuous Benchmarking for the Go compiler

Home Page: https://goperf.org

License: BSD 3-Clause "New" or "Revised" License

Go 93.87% HCL 1.76% Shell 1.64% CSS 1.37% TSQL 1.31% PLpgSQL 0.05%

goperf's People

Contributors

mmcloughlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

goperf's Issues

observability: basic metrics

Use Stackdriver Monitoring to define some basic metrics, for example:

  • Number of tasks in each state
  • Coverage: percentage of commits with at least one result, broken down by env/module

ingest: batch results insert

Ingest job is taking nearly 5 minutes.

Screenshot from 2020-05-07 00-26-38

It's written in the least efficient way possible right now. Use batch inserts to speed it up.

benchmark runner

Library code that will run benchmarks on a given:

  • go commit (pulled down from snapshots)
  • package at a given commit
  • go test flags

sched: failure detection

For each module there will be a minimum go commit that it works for. Any earlier commits are bound to fail, so the work scheduler should be able to detect when this has happened and stop scheduling work before that point.

workers: cleanup artifacts directory

Workers currently write results files to an artifacts directory which isn't cleaned up. This directory could grow indefinitely.

We should ensure that files are cleaned up after they are needed.

fn: enqueue

Cloud function triggered on new commits added to firestore to enqueue benchmark jobs on pubsub topic.

ingest: handle stale tasks in results_uploaded state

For some reason a small number of tasks are stuck in the results_uploaded state. At the moment these trigger the stale timeout and are re-processed. This is fine but it might be better to have a secondary process that ingests data files from these tasks.

benchmark workers

Auto-scaling group of workers subscribed to a pubsub topic, executing benchmarks and writing to storage bucket.

Related #1 #2

fn: report whether watch inserted an object

Currently the logs from watch just say upserted commit <sha> so we don't know whether the object was added or not. It would be good to determine from the firestore response whether an insert happened.

db: commit positions table

To support other features I think it's finally necessary to use a commit index, rather than date.

Create and regularly update a commit position table.

infra,dashboard: release preparation

  • increase cache control max-age
  • temporary larger database instance
  • increase database max_connections
  • turn off workers
  • rerun changes job
  • crawl the site

dashboard: improve package summary

Package summary page is awful right now. Need to display more information about the benchmarks, since right now you can't even tell which one is which.

Screenshot from 2020-04-20 19-04-46

db: check stability of commit index

The system is detecting clearly spurious changes, for example at a commit that adds a name to the authors file. This is likely paranoia but one potential explanation is that for some reason the computation of commit index is not stable. For my sanity, verify this is not the case.

dashboard: fix commit ordering

Graphs such as below suggest that timeseries ordering is not correct.

Screenshot from 2020-04-20 22-04-26

https://goperf.org/bench/9cdae867-65b9-5e52-96a2-af34ef9c62be

This graph should have a step change in it, but the scatter plot shows the lower "step" continues and overlaps the higher one. Inspecting some of the points suggests that the lower step actually comes from the dev.link branch, which presumably still has an older version of the code. Meanwhile master contains the performance regression, and development is happening concurrently on both branches.

This obscures what's really going on and makes it far harder to pinpoint exact commits responsible for a performance change. We need a more nuanced approach to ordering commits by time.

worker: panic in snapshot download

2020-05-04T18:16:26.748-0700	debug	start initializing
2020-05-04T18:16:26.748-0700	info	install toolchain	{"toolchain": "snapshot/linux-amd64/c9d5f60eaa4450ccf1ce878d55b4c6a12843f2f3"}
2020-05-04T18:16:26.748-0700	debug	start snapshot_install
2020-05-04T18:16:26.749-0700	info	install snapshot	{"builder_type": "linux-amd64", "go_revision": "c9d5f60eaa4450ccf1ce878d55b4c6a12843f2f3", "snapshot_url": "https://storage.googleapis.com/go-build-snap/go/linux-amd64/c9d5f60eaa4450ccf1ce878d55b4c6a12843f2f3.tar.gz"}
2020-05-04T18:16:26.749-0700	debug	change working directory	{"cwd": "/tmp/contbench842959164/sandbox/dl663998315"}
2020-05-04T18:16:26.749-0700	debug	start download	{"url": "https://storage.googleapis.com/go-build-snap/go/linux-amd64/c9d5f60eaa4450ccf1ce878d55b4c6a12843f2f3.tar.gz", "path": "/tmp/contbench842959164/sandbox/dl663998315/go.tar.gz"}
2020-05-04T18:32:36.460-0700	debug	finish download	{"duration": "16m9.711261542s"}
2020-05-04T18:32:36.460-0700	debug	finish snapshot_install	{"duration": "16m9.711539518s"}
2020-05-04T18:32:36.460-0700	debug	finish initializing	{"duration": "16m9.71162319s"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x93dafc]

goroutine 1 [running]:
github.com/mmcloughlin/cb/pkg/runner.(*Workspace).Download(0xc000404f00, 0xc0001183f0, 0x6b, 0xc0003a0180, 0x35)
	github.com/mmcloughlin/cb/pkg/runner/workspace.go:256 +0x42c
github.com/mmcloughlin/cb/pkg/runner.(*snapshot).Install(0xc000400300, 0xc000404f00, 0xc000354700, 0x1e)
	github.com/mmcloughlin/cb/pkg/runner/toolchain.go:176 +0x627
github.com/mmcloughlin/cb/pkg/runner.(*Runner).Init(0xc000034380, 0xd0f220, 0xc0000dd500)
	github.com/mmcloughlin/cb/pkg/runner/runner.go:50 +0x2d3
main.(*Processor).Process(0xc00031a420, 0xd0f220, 0xc0000dd500, 0xc000034180, 0xe6361c98ba214c82, 0x0, 0x0, 0x0)
	github.com/mmcloughlin/cb/app/cmd/worker/run.go:116 +0x5b1
github.com/mmcloughlin/cb/app/worker.(*Worker).process(0xc0000ccbe0, 0xd0f220, 0xc0000dd500, 0xc000034180, 0x0, 0x0)
	github.com/mmcloughlin/cb/app/worker/worker.go:133 +0x1a3
github.com/mmcloughlin/cb/app/worker.(*Worker).Run(0xc0000ccbe0, 0xd0f220, 0xc0000dd500, 0xc00025fdf8, 0x1)
	github.com/mmcloughlin/cb/app/worker/worker.go:86 +0xd3
main.(*Run).Execute(0xc0000ccb90, 0xd0f220, 0xc0000dd500, 0xc0000c5440, 0x0, 0x0, 0x0, 0xc0001cddc0)
	github.com/mmcloughlin/cb/app/cmd/worker/run.go:77 +0x257
github.com/google/subcommands.(*Commander).Execute(0xc0000aa080, 0xd0f220, 0xc0000dd500, 0x0, 0x0, 0x0, 0xc0000b2000)
	github.com/google/[email protected]/subcommands.go:209 +0x2f9
github.com/google/subcommands.Execute(...)
	github.com/google/[email protected]/subcommands.go:492
main.run(0xd0f220, 0xc0000dd500, 0xc0000c5320, 0xc00025ff78)
	github.com/mmcloughlin/cb/app/cmd/worker/main.go:39 +0x240
github.com/mmcloughlin/cb/pkg/command.Run(0xc18bf0)
	github.com/mmcloughlin/cb/pkg/command/command.go:33 +0xc0
main.main()
	github.com/mmcloughlin/cb/app/cmd/worker/main.go:15 +0x2d

pkg/shield: handle incomplete shutdown

If a worker process doesn't shut down cleanly, the sys and shield cpusets can be left around. This causes any subsequent attempts to setup a CPU shield to fail.

The shield logic could be made to handle the case where the cpusets already exist.

runner: frequency pinning

Currently the runner just uses performance scaling governor. Consider pinning frequency instead, similar to perflock.

package deletion

This project has evolved a lot and some approaches have been abandoned so it makes sense to delete the code. This issue just records which packages have been deleted (or should be soon) in case they are useful again later.

  • app/model
  • app/mapper
  • app/obj
  • firestore dependency
  • fn/enqueue
  • app/consumer
  • app/launch
  • pubsub dependency
  • app/cmd/launcher
  • app/gce
  • empty firestore db
  • delete old buckets
  • script/dist.sh
  • fn/perfdataupload

dashboard: miscellaneous tweaks

  • nav: "Go Performance Dashboard" heading?
  • changes: gap between table and heading is cramped
  • changes: friendly units
  • changes: top 5 for each
  • changes: false positives warning
  • modules: sort list
  • module view: "Version:" is empty for std
  • package view: show module version
  • bench graph: default tooltip value: 42,261, 7.11 is confusing
  • result view: metadata view partially hidden on overflow
  • result view: excess precision
  • commit view: show other metadata: author, committer, commit time, ...
  • commit view: linkify
  • file view: widen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.