mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Added async performance test
This commit is contained in:
parent
363f590019
commit
7aa3350d45
9 changed files with 122 additions and 17 deletions
3
etc/ci/performance/page_load_test/example.manifest
Normal file
3
etc/ci/performance/page_load_test/example.manifest
Normal file
|
@ -0,0 +1,3 @@
|
|||
http://localhost:8000/page_load_test/example/example_sync.html
|
||||
async http://localhost:8000/page_load_test/example/example_async.html
|
||||
|
23
etc/ci/performance/page_load_test/example/example_async.html
Normal file
23
etc/ci/performance/page_load_test/example/example_async.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
Hello World
|
||||
<!-- Remember to include the /harness/harness.js file
|
||||
for the mark() and done() function -->
|
||||
<script src="/harness/harness.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
// Create a timestamp before the test
|
||||
mark("test start");
|
||||
// Do something slow here
|
||||
// Create another timestamp after the test
|
||||
mark("test end");
|
||||
// Tell the test harness you're done, otherwise it will keep waiting
|
||||
done();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
13
etc/ci/performance/page_load_test/example/example_sync.html
Normal file
13
etc/ci/performance/page_load_test/example/example_sync.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
Hello World
|
||||
<!-- window.performance.timing are recorded.
|
||||
Window closes after onLoad event triggered -->
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue