Add benchmarking code (#448)

* adding benchmarking code

* enable writing to file

* fix build

* time more stuff

* adding benchmarking to integration tests

* compare docker and kaniko times in integration tests

* Switch to setting benchmark file with an env var

* close file at the right time

* fix integration test with environment variables

* fix integration tests

* Adding benchmarking documentation to DEVELOPEMENT.md

* human readable benchmarking steps
This commit is contained in:
Sharif Elgamal
2018-11-28 11:54:12 -08:00
committed by GitHub
parent a49fd79e0e
commit 7cde036f44
6 changed files with 85 additions and 11 deletions
-2
View File
@@ -18,7 +18,6 @@ package timing
import (
"bytes"
"fmt"
"sync"
"text/template"
"time"
@@ -42,7 +41,6 @@ func (tr *TimedRun) Stop(t *Timer) {
if _, ok := tr.categories[t.category]; !ok {
tr.categories[t.category] = 0
}
fmt.Println(stop)
tr.cl.Lock()
defer tr.cl.Unlock()
tr.categories[t.category] += stop.Sub(t.startTime)