From 77c81bef243e1e6a1e04cf4053c62fa332ad8d0f Mon Sep 17 00:00:00 2001 From: Sydney Munro Date: Thu, 25 Jan 2024 15:57:47 -0800 Subject: [PATCH 1/4] chore(benchmarking): Move warmup out of sample runs and fix throughput on fail --- .../storage/benchmarking/StorageSharedBenchmarkingCli.java | 2 +- .../main/java/com/google/cloud/storage/benchmarking/W1R3.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java b/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java index d2df5fcab5..9aa4618080 100644 --- a/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java +++ b/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java @@ -142,8 +142,8 @@ private void runWorkload4() { private void runW1R3(Storage storageClient) throws ExecutionException, InterruptedException { ListeningExecutorService executorService = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(workers)); + runWarmup(storageClient); for (int i = 0; i < samples; i++) { - runWarmup(storageClient); Range objectSizeRange = Range.of(objectSize); int objectSize = getRandomInt(objectSizeRange.min, objectSizeRange.max); convert( diff --git a/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java b/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java index 123658a1af..7cb9c44ac4 100644 --- a/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java +++ b/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java @@ -97,7 +97,7 @@ public String call() { .setBucketName("") .setStatus("FAIL") .setTransferSize("") - .setThroughput(-1) + .setThroughput(0) .build(); printWriter.println(result); return "FAIL"; From 219af8cd736ab99eec46b3d9fb98c5c427254a11 Mon Sep 17 00:00:00 2001 From: Sydney Munro Date: Fri, 26 Jan 2024 08:35:38 -0800 Subject: [PATCH 2/4] Exiting with fail if we catch an error --- .../storage/benchmarking/StorageSharedBenchmarkingCli.java | 2 ++ .../main/java/com/google/cloud/storage/benchmarking/W1R3.java | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java b/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java index 9aa4618080..c699a39b06 100644 --- a/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java +++ b/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/StorageSharedBenchmarkingCli.java @@ -124,6 +124,7 @@ private void runWorkload1() { runW1R3(storageClient); } catch (Exception e) { System.err.println("Failed to run workload 1: " + e.getMessage()); + System.exit(1); } } @@ -136,6 +137,7 @@ private void runWorkload4() { runW1R3(storageClient); } catch (Exception e) { System.err.println("Failed to run workload 4: " + e.getMessage()); + System.exit(1); } } diff --git a/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java b/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java index 7cb9c44ac4..b192fab118 100644 --- a/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java +++ b/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java @@ -81,7 +81,6 @@ public String call() { } } StorageSharedBenchmarkingUtils.cleanupObject(storage, created); - return "OK"; } catch (Exception e) { CloudMonitoringResult result = CloudMonitoringResult.newBuilder() @@ -100,8 +99,8 @@ public String call() { .setThroughput(0) .build(); printWriter.println(result); - return "FAIL"; } + return "OK"; } private void printResult(String op, Blob created, Duration duration) { From 15eb8593b61ef134d80e42658765763f67fd8ed5 Mon Sep 17 00:00:00 2001 From: Sydney Munro Date: Mon, 5 Feb 2024 13:21:32 -0800 Subject: [PATCH 3/4] fix metric formatting --- .../main/java/com/google/cloud/storage/benchmarking/W1R3.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java b/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java index b192fab118..83b357db27 100644 --- a/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java +++ b/storage-shared-benchmarking/src/main/java/com/google/cloud/storage/benchmarking/W1R3.java @@ -98,7 +98,7 @@ public String call() { .setTransferSize("") .setThroughput(0) .build(); - printWriter.println(result); + printWriter.println(result.formatAsCustomMetric()); } return "OK"; } From f34d49ce7692e4d18c5b4134092a830b31cf2e1e Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 5 Feb 2024 21:24:21 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2394ea3bee..6d2bb70810 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.30.0') +implementation platform('com.google.cloud:libraries-bom:26.31.0') implementation 'com.google.cloud:google-cloud-storage' ```