aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-05-16 13:44:02 +0200
committerLars Knoll <lars.knoll@qt.io>2017-05-19 06:22:55 +0000
commit947310e01355b3657bf5d0103545586bf5a9b37c (patch)
tree8aad5e1d95ba98e77a6f983c6fefd9e50ecb66e4 /tests
parent43d34fd6f96ed6b07fe79cf1637d5ec66cc97f4f (diff)
Run GC between different benchmark runs
Change-Id: I46654e5c05851534507dc78b7a492a059dab2e14 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/v4/v8-bench.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/manual/v4/v8-bench.js b/tests/manual/v4/v8-bench.js
index 41a04fa29a..bfce6231e4 100644
--- a/tests/manual/v4/v8-bench.js
+++ b/tests/manual/v4/v8-bench.js
@@ -202,6 +202,9 @@ BenchmarkSuite.prototype.NotifyError = function(error) {
// Runs a single benchmark for at least a second and computes the
// average time it takes to run a single iteration.
BenchmarkSuite.prototype.RunSingleBenchmark = function(benchmark, data) {
+ // run the garbage collector, to give more reproducible conditions to each test
+ gc()
+
function Measure(data) {
var elapsed = 0;
var start = new Date();