blob: 4d2a2b8f65f3fa245d5fbd3ed82f24135b5ea152 [file] [log] [blame]
<!DOCTYPE html>
<script src="../resources/runner.js"></script>
<script>
// Use measureTime instead of runsPerSecond to avoid a ridiculous number of requests in flight.
// 100 is realistic, 1000 is plausible, but 10000 is crazy.
PerfTestRunner.measureTime({
description: "Measure the time it takes to create, open, and send 1000 async XMLHttpRequests",
run: function() {
var xhrs = [];
for (var i = 0; i < 1000; ++i) {
var xhr = new XMLHttpRequest();
xhr.open("GET", "file" + i + ".txt", true);
xhr.send();
xhrs.push(xhr);
}
},
});
</script>