From d603567953da6c227ef03b3f44b7ca9edca4ce61 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 6 Mar 2017 18:02:21 +0100 Subject: [PATCH] print raw Timings data in performance tests --- .../src/com/intellij/testFramework/Timings.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/testFramework/src/com/intellij/testFramework/Timings.java b/platform/testFramework/src/com/intellij/testFramework/Timings.java index 3afd1e3e9062..77bd8648a6ea 100644 --- a/platform/testFramework/src/com/intellij/testFramework/Timings.java +++ b/platform/testFramework/src/com/intellij/testFramework/Timings.java @@ -21,6 +21,7 @@ import com.intellij.util.ArrayUtil; import java.io.*; import java.math.BigInteger; +import java.util.Arrays; /** * @author peter @@ -40,6 +41,7 @@ public class Timings { public static final long ETALON_CPU_TIMING = 200; public static final long ETALON_IO_TIMING = 100; + private static final long[] CPU_TIMING_DATA; static { int N = 20; @@ -50,6 +52,7 @@ public class Timings { for (int i=0; i< N; i++) { elapsed[i] = measureCPU(); } + CPU_TIMING_DATA = elapsed; CPU_TIMING = ArrayUtil.averageAmongMedians(elapsed, 2); long start = System.currentTimeMillis(); @@ -124,6 +127,6 @@ public class Timings { " Timings: CPU=" + CPU_TIMING + " (" + (int)(CPU_TIMING*1.0/ ETALON_CPU_TIMING*100) + "% of the etalon)" + ", I/O=" + IO_TIMING + " (" + (int)(IO_TIMING*1.0/ ETALON_IO_TIMING*100) + "% of the etalon)" + ", total=" + MACHINE_TIMING + " ("+(int)(MACHINE_TIMING*1.0/ ETALON_TIMING*100) + "% of the etalon) " + - Runtime.getRuntime().availableProcessors() + " cores."; + Runtime.getRuntime().availableProcessors() + " cores.\nRaw timings data: " + Arrays.toString(CPU_TIMING_DATA); } }