Skip to content

Commit

Permalink
[BlinkGC PerfTest] Add SVGLengthList stress test
Browse files Browse the repository at this point in the history
Add a PerformanceTest to measure time taken by Blink GC to traverse a large SVGLengthList.

BUG=420515

Review URL: https://codereview.chromium.org/773263004

git-svn-id: svn://svn.chromium.org/blink/trunk@186675 bbb929c8-8fbe-4397-9dbb-9b2b20218538
  • Loading branch information
nyaxt committed Dec 8, 2014
1 parent 17de41c commit 121510f
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<title>Benchmark - Stress Blink GC</title>
</head>
<body>
<script src="../resources/runner.js"></script>
<script src="resources/measure-gc.js"></script>
<script>
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');

function createSVGLengthList() {
var text = document.createElementNS('http://www.w3.org/2000/svg', 'text');
return text.x.baseVal;
}

window.onload = function() {
var list = createSVGLengthList();
for (var i = 0; i < 500000; ++i)
list.appendItem(svg.createSVGLength());

PerfTestRunner.measureBlinkGCTime({description: 'Stress Blink GC by GCing a large SVGLengthList'});
}
</script>
</body>
</html>

0 comments on commit 121510f

Please sign in to comment.