chromium/third_party/blink/perf_tests/bindings/serialize-long-string.html

<!DOCTYPE html>
<body>
<script src="../resources/runner.js"></script>
<script>

var log2Length = 23;
var str = "a";
for (var i = 0; i < log2Length; i++)
    str = str + str;
var worker = new Worker('resources/worker.js');
worker.onmessage = function(event) {
    console.log("received");
};

PerfTestRunner.measureTime({
    description: "Measures performance of serializing a long string.",
    run: function() {
        worker.postMessage(str);
    }
});
</script>
</body>