Skip to content

Commit

Permalink
chore(benchmarking): Remove default for temp directory and read from …
Browse files Browse the repository at this point in the history
…java.io.tmpdir system property (#2191)
  • Loading branch information
sydney-munro committed Sep 7, 2023
1 parent 45e66e8 commit 67badab
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public final class StorageSharedBenchmarkingCli implements Runnable {

@Option(
names = "-temp_dir_location",
defaultValue = "/tmp",
description = "Specify the path where the temporary directory should be located")
String tempDirLocation;

Expand All @@ -106,7 +105,10 @@ private void runWorkload1() {
StorageOptions retryStorageOptions =
StorageOptions.newBuilder().setProjectId(project).setRetrySettings(retrySettings).build();
Storage storageClient = retryStorageOptions.getService();
Path tempDir = Paths.get(tempDirLocation);
Path tempDir =
tempDirLocation != null
? Paths.get(tempDirLocation)
: Paths.get(System.getProperty("java.io.tmpdir"));
ListeningExecutorService executorService =
MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(workers));
List<ApiFuture<String>> workloadRuns = new ArrayList<>();
Expand Down

0 comments on commit 67badab

Please sign in to comment.