Skip to content

Commit

Permalink
cleanup object created by ssb
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-munro committed Feb 16, 2024
1 parent b27e3c2 commit 08d348c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public String call() throws Exception {
Instant endTime = clock.instant();
Duration elapsedTimeWrite = Duration.between(startTime, endTime);
printResult("BIDI", created, elapsedTimeWrite);
StorageSharedBenchmarkingUtils.cleanupObject(storageClient, created);
return "OK";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class StorageSharedBenchmarkingUtils {
public static long SSB_SIZE_THRESHOLD_BYTES = 1048576;
public static int DEFAULT_NUMBER_OF_READS = 3;

public static void cleanupObject(Storage storage, Blob created) {
public static void cleanupObject(Storage storage, BlobInfo created) {
storage.delete(
created.getBlobId(), Storage.BlobSourceOption.generationMatch(created.getGeneration()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public String call() {
printResult("READ[" + i + "]", created, elapsedTimeDownload);
}
}
StorageSharedBenchmarkingUtils.cleanupObject(storage, created);
StorageSharedBenchmarkingUtils.cleanupObject(storage, created.asBlobInfo());
} catch (Exception e) {
CloudMonitoringResult result =
CloudMonitoringResult.newBuilder()
Expand Down

0 comments on commit 08d348c

Please sign in to comment.