Only log the hour of the benchmark run. (#544)

Also combine all files into one directory.
This commit is contained in:
dlorenc 2019-01-28 15:53:13 -06:00 committed by GitHub
parent 4c960709df
commit e3bf9fb062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -197,7 +197,8 @@ func (d *DockerFileBuilder) BuildImage(imageRepo, gcsBucket, dockerfilesPath, do
if b, err := strconv.ParseBool(os.Getenv("BENCHMARK")); err == nil && b {
benchmarkEnv = "BENCHMARK_FILE=/kaniko/benchmarks/" + dockerfile
benchmarkFile := path.Join(benchmarkDir, dockerfile)
dst := path.Join("benchmarks/run_"+time.Now().Format("2006-01-02-15:04:05"), dockerfile)
fileName := fmt.Sprintf("run_%s_%s", time.Now().Format("2006-01-02-15:04"), dockerfile)
dst := path.Join("benchmarks", fileName)
defer UploadFileToBucket(gcsBucket, benchmarkFile, dst)
}