2001-04-10 04:27:40 +00:00
|
|
|
<!-- 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) {
|
2001-04-10 05:24:28 +00:00
|
|
|
dump('\n\n__startuptime,' + startupTime + '\n\n');
|
2001-04-10 04:27:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// As soon as page loads, print out time.
|
|
|
|
window.onload = phoneHome();
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|