mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
cmd: use os.MkdirTemp instead of ioutil.TempDir (#10320)
Signed-off-by: ianwoolf <btw515wolf2@gmail.com>
This commit is contained in:
parent
a9e2ffb717
commit
025528a5d6
|
@ -18,7 +18,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"math"
|
"math"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
@ -70,7 +69,7 @@ func benchmarkWrite(outPath, samplesFile string, numMetrics, numScrapes int) err
|
||||||
logger: log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr)),
|
logger: log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr)),
|
||||||
}
|
}
|
||||||
if b.outPath == "" {
|
if b.outPath == "" {
|
||||||
dir, err := ioutil.TempDir("", "tsdb_bench")
|
dir, err := os.MkdirTemp("", "tsdb_bench")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue