Skip to content

Commit 5f3cdeb

Browse files
committed
update workloads to run 35 times and the logs to provide a median as well as a mean
1 parent 9f4b775 commit 5f3cdeb

6 files changed

Lines changed: 21 additions & 11 deletions

File tree

runners/s3-benchrunner-java/src/main/java/com/example/s3benchrunner/Main.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.example.s3benchrunner;
22

33
import java.util.ArrayList;
4+
import java.util.Arrays;
45
import java.util.List;
56

67
import com.example.s3benchrunner.crtjava.CRTJavaBenchmarkRunner;
@@ -33,6 +34,14 @@ private static void printStats(long bytesPerRun, List<Double> durations) {
3334
gbpsMean += g / n;
3435
}
3536

37+
// Median throughput
38+
double[] sortedGbps = gbpsValues.clone();
39+
Arrays.sort(sortedGbps);
40+
int len = sortedGbps.length;
41+
double gbpsMedian = (len % 2 == 1)
42+
? sortedGbps[len / 2]
43+
: (sortedGbps[len / 2 - 1] + sortedGbps[len / 2]) / 2.0;
44+
3645
// Variance of throughput
3746
double gbpsVariance = 0;
3847
for (double g : gbpsValues) {
@@ -50,8 +59,9 @@ private static void printStats(long bytesPerRun, List<Double> durations) {
5059
}
5160

5261
System.out.printf(
53-
"Overall stats; Throughput Mean:%.3f Gb/s Throughput Variance:%.3f Gb/s Duration Mean:%.3f s Duration Variance:%.3f s %n",
62+
"Overall stats; Throughput Mean:%.3f Gb/s Throughput Median:%.3f Gb/s Throughput Variance:%.3f Gb/s Duration Mean:%.3f s Duration Variance:%.3f s %n",
5463
gbpsMean,
64+
gbpsMedian,
5565
gbpsVariance,
5666
durationMean,
5767
durationVariance);

workloads/download-256KiB-10_000x.run.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"comment": "Use case is an AI company with millions of JPGs",
44
"filesOnDisk": true,
55
"checksum": null,
6-
"maxRepeatCount": 10,
7-
"maxRepeatSecs": 600,
6+
"maxRepeatCount": 35,
7+
"maxRepeatSecs": 3600,
88
"tasks": [
99
{
1010
"action": "download",

workloads/download-30GiB-1x.run.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"comment": "",
44
"filesOnDisk": true,
55
"checksum": null,
6-
"maxRepeatCount": 10,
7-
"maxRepeatSecs": 600,
6+
"maxRepeatCount": 35,
7+
"maxRepeatSecs": 3600,
88
"tasks": [
99
{
1010
"action": "download",

workloads/download-max-throughput.run.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"comment": "Find the limits of network I/O. Don't do anything that might slow us down, like touch the disk",
44
"filesOnDisk": false,
55
"checksum": null,
6-
"maxRepeatCount": 10,
7-
"maxRepeatSecs": 600,
6+
"maxRepeatCount": 35,
7+
"maxRepeatSecs": 3600,
88
"tasks": [
99
{"action": "download", "key": "download/5GiB-1x/1", "size": 5368709120},
1010
{"action": "download", "key": "download/5GiB-1x/1", "size": 5368709120},

workloads/upload-256KiB-10_000x.run.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"comment": "Use case is an AI company with millions of JPGs",
44
"filesOnDisk": true,
55
"checksum": null,
6-
"maxRepeatCount": 10,
7-
"maxRepeatSecs": 600,
6+
"maxRepeatCount": 35,
7+
"maxRepeatSecs": 3600,
88
"tasks": [
99
{
1010
"action": "upload",

workloads/upload-max-throughput.run.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"comment": "Find the limits of network I/O. Don't do anything that might slow us down, like touch the disk",
44
"filesOnDisk": false,
55
"checksum": null,
6-
"maxRepeatCount": 10,
7-
"maxRepeatSecs": 600,
6+
"maxRepeatCount": 35,
7+
"maxRepeatSecs": 3600,
88
"tasks": [
99
{"action": "upload", "key": "upload/5GiB-1x/1", "size": 5368709120},
1010
{"action": "upload", "key": "upload/5GiB-1x/1", "size": 5368709120},

0 commit comments

Comments
 (0)