Repository: GoogleCloudPlatform/PerfKitBenchmarker

Issue:
object_storage_service benchmark quantiles should be symmetrical
The summary output for object_storage_service lists p1, p5, p50, p90, p99 and p99.9, which is great for metrics where lower is better (e.g. latency) because you can see with good resolution how long the tail is, but for metrics where higher is better (e.g. throughput) there's less data around the "bad" side of the tail. Would be nice to have p0.1, p1, [p5,] p10, p50, p90, [p95,] p99, p99.9.



Discussion:
Would you like to take this on in terms of adding the metrics?  We can also do it.

I'm happy to do it. Will work on it today.


Resolving patch:
diff --git a/perfkitbenchmarker/linux_benchmarks/object_storage_service_benchmark.py b/perfkitbenchmarker/linux_benchmarks/object_storage_service_benchmark.py
--- a/perfkitbenchmarker/linux_benchmarks/object_storage_service_benchmark.py
+++ b/perfkitbenchmarker/linux_benchmarks/object_storage_service_benchmark.py
@@ -129,8 +129,8 @@
 THROUGHPUT_UNIT = 'Mbps'
 LATENCY_UNIT = 'seconds'
 NA_UNIT = 'na'
-PERCENTILES_LIST = ['p1', 'p5', 'p50', 'p90', 'p99', 'p99.9', 'average',
-                    'stddev']
+PERCENTILES_LIST = ['p0.1', 'p1', 'p5', 'p10', 'p50', 'p90', 'p95', 'p99',
+                    'p99.9', 'average', 'stddev']
 
 UPLOAD_THROUGHPUT_VIA_CLI = 'upload throughput via cli Mbps'
 DOWNLOAD_THROUGHPUT_VIA_CLI = 'download throughput via cli Mbps'
diff --git a/perfkitbenchmarker/sample.py b/perfkitbenchmarker/sample.py
--- a/perfkitbenchmarker/sample.py
+++ b/perfkitbenchmarker/sample.py
@@ -15,7 +15,7 @@
 
 import collections
 import time
-PERCENTILES_LIST = [1, 5, 50, 90, 99, 99.9]
+PERCENTILES_LIST = [0.1, 1, 5, 10, 50, 90, 95, 99, 99.9]
 
 _SAMPLE_FIELDS = 'metric', 'value', 'unit', 'metadata', 'timestamp'
 


Test patch:
diff --git a/perfkitbenchmarker/scripts/object_storage_api_tests.py b/perfkitbenchmarker/scripts/object_storage_api_tests.py
--- a/perfkitbenchmarker/scripts/object_storage_api_tests.py
+++ b/perfkitbenchmarker/scripts/object_storage_api_tests.py
@@ -146,10 +146,13 @@ def PercentileCalculator(numbers):
   count = len(numbers_sorted)
   total = sum(numbers_sorted)
   result = {}
+  result['p0.1'] = numbers_sorted[int(count * 0.001)]
   result['p1'] = numbers_sorted[int(count * 0.01)]
   result['p5'] = numbers_sorted[int(count * 0.05)]
+  result['p10'] = numbers_sorted[int(count * 0.1)]
   result['p50'] = numbers_sorted[int(count * 0.5)]
   result['p90'] = numbers_sorted[int(count * 0.9)]
+  result['p95'] = numbers_sorted[int(count * 0.95)]
   result['p99'] = numbers_sorted[int(count * 0.99)]
   result['p99.9'] = numbers_sorted[int(count * 0.999)]
   if count > 0:
diff --git a/tests/linux_benchmarks/mysql_service_benchmark_test.py b/tests/linux_benchmarks/mysql_service_benchmark_test.py
--- a/tests/linux_benchmarks/mysql_service_benchmark_test.py
+++ b/tests/linux_benchmarks/mysql_service_benchmark_test.py
@@ -37,10 +37,13 @@ def testParseSysbenchResult(self):
         self.contents, results, metadata)
     logging.info('results are, %s', results)
     expected_results = [
+        sample.Sample('sysbench tps p0.1', 526.38, 'NA', {}),
         sample.Sample('sysbench tps p1', 526.38, 'NA', {}),
         sample.Sample('sysbench tps p5', 526.38, 'NA', {}),
+        sample.Sample('sysbench tps p10', 526.38, 'NA', {}),
         sample.Sample('sysbench tps p50', 579.5, 'NA', {}),
         sample.Sample('sysbench tps p90', 636.0, 'NA', {}),
+        sample.Sample('sysbench tps p95', 636.0, 'NA', {}),
         sample.Sample('sysbench tps p99', 636.0, 'NA', {}),
         sample.Sample('sysbench tps p99.9', 636.0, 'NA', {}),
         sample.Sample('sysbench tps average', 583.61, 'NA', {}),