зеркало из https://github.com/mozilla/gecko-dev.git
Moving this file to mozilla/tools/performance/startup, so we can group all the startup test stuff together. r=jrgm,dp
This commit is contained in:
Родитель
05d45693b7
Коммит
4d655f666d
|
@ -1,42 +0,0 @@
|
|||
<!-- Pick off begin time as a cgi argument and print it out -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Mozilla Startup Timing Test</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
|
||||
// Pick off the time from the file URL.
|
||||
// file:///foo/startup.html?begin=986869269000
|
||||
function tokenizeQuery() {
|
||||
var query = {};
|
||||
var pairs = document.location.search.substring(1).split('&');
|
||||
for (var i=0; i < pairs.length; i++) {
|
||||
var pair = pairs[i].split('=');
|
||||
query[pair[0]] = unescape(pair[1]);
|
||||
}
|
||||
return query;
|
||||
}
|
||||
|
||||
// Dump startup time out to console.
|
||||
function phoneHome() {
|
||||
var testFoo;
|
||||
var now = (new Date()).getTime();
|
||||
var q = tokenizeQuery();
|
||||
var begin = q['begin'] || 0; // when did perl launch this
|
||||
var startupTime = now - begin;
|
||||
document.write('\n\nStartup time = ' + startupTime + ' ms<br>');
|
||||
if (window.dump) {
|
||||
dump('\n\n__startuptime,' + startupTime + '\n\n');
|
||||
}
|
||||
}
|
||||
|
||||
// As soon as page loads, print out time.
|
||||
window.onload = phoneHome();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче