FAQ
Reviewers: adg,

Message:
Hello adg@golang.org (cc: golang-dev@googlegroups.com),

I'd like you to review this change to
https://code.google.com/p/dvyukov-go-perf-dashboard


Description:
dashboard/builder: update benchmarks only between commits
It looks unnecessary to update benchmarks with go get -u
between all benchmarks (i.e. every ~30 secs).
Instead update benchmarks only between commits.
TBR=adg

Please review this at https://codereview.appspot.com/44550043/

Affected files (+9, -3 lines):
    M dashboard/builder/bench.go


Index: dashboard/builder/bench.go
===================================================================
--- a/dashboard/builder/bench.go
+++ b/dashboard/builder/bench.go
@@ -30,6 +30,7 @@
    // Create place in which to do work.
    workpath := filepath.Join(*buildroot, b.name+"-"+hash[:12])
    // Prepare a workpath if we don't have one we can reuse.
+ update := false
    if b.lastWorkpath != workpath {
     if err := os.Mkdir(workpath, mkdirPerm); err != nil {
      return err
@@ -42,10 +43,11 @@
      return b.recordPerfResult(res)
     }
     b.lastWorkpath = workpath
+ update = true
    }

    // Build the benchmark binary.
- benchBin, buildLog, err := b.buildBenchmark(workpath)
+ benchBin, buildLog, err := b.buildBenchmark(workpath, update)
    if err != nil {
     // record failure
     res.Artifacts = append(res.Artifacts, PerfArtifact{"log", buildLog})
@@ -76,7 +78,7 @@
   }

   // buildBenchmark builds the benchmark binary.
-func (b *Builder) buildBenchmark(workpath string) (benchBin, log string,
err error) {
+func (b *Builder) buildBenchmark(workpath string, update bool) (benchBin,
log string, err error) {
    goroot := filepath.Join(workpath, "go")
    gobin := filepath.Join(goroot, "bin", "go") + exeExt
    gopath := filepath.Join(*buildroot, "gopath")
@@ -84,7 +86,11 @@
     "GOROOT=" + goroot,
     "GOPATH=" + gopath},
     b.envv()...)
- cmd := []string{gobin, "get", "-u", *benchPath}
+ cmd := []string{gobin, "get"}
+ if update {
+ cmd = append(cmd, "-u")
+ }
+ cmd = append(cmd, *benchPath)
    var buildlog bytes.Buffer
    ok, err := runOutput(*buildTimeout, env, &buildlog, workpath, cmd...)
    if !ok || err != nil {


--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Dvyukov at Dec 24, 2013 at 5:21 pm
    *** Submitted as
    https://code.google.com/p/dvyukov-go-perf-dashboard/source/detail?r=68941e8eb94a
    ***

    dashboard/builder: update benchmarks only between commits
    It looks unnecessary to update benchmarks with go get -u
    between all benchmarks (i.e. every ~30 secs).
    Instead update benchmarks only between commits.
    TBR=adg

    R=adg
    CC=golang-dev
    https://codereview.appspot.com/44550043


    https://codereview.appspot.com/44550043/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedDec 24, '13 at 5:21p
activeDec 24, '13 at 5:21p
posts2
users1
websitegolang.org

1 user in discussion

Dvyukov: 2 posts

People

Translate

site design / logo © 2021 Grokbase