go/performance/benchmarks: OpenForWrite takes os.FilePerm.

This commit is contained in:
Aaron Son
2020-04-13 12:11:33 -07:00
parent 75e1e13faf
commit 7d6bc53282
2 changed files with 3 additions and 2 deletions

View File

@@ -199,7 +199,7 @@ func getBenchmarkingTools(fs filesys.Filesys, rows int, cols []*SeedColumn, work
}
func setupDEnvImport(fs filesys.Filesys, sch *SeedSchema, workingDir, tableName, pathToSchemaFile, pathToImportFile string) *env.DoltEnv {
wc, err := fs.OpenForWrite(pathToImportFile)
wc, err := fs.OpenForWrite(pathToImportFile, os.ModePerm)
if err != nil {
log.Fatal(err)
}

View File

@@ -18,6 +18,7 @@ import (
"fmt"
"io"
"log"
"os"
"path/filepath"
"testing"
"time"
@@ -156,7 +157,7 @@ func serializeResults(results []result, path, tableName, format string) {
now := time.Now()
fs := filesys.LocalFS
resultsFile := filepath.Join(path, fmt.Sprintf("benchmark_results-%04d-%02d-%02d%s", now.Year(), now.Month(), now.Day(), format))
wc, err := fs.OpenForWrite(resultsFile)
wc, err := fs.OpenForWrite(resultsFile, os.ModePerm)
if err != nil {
log.Fatal(err)
}