Merge pull request #580 from jitsi/performance_torture
Stores measured times and exposes them
This commit is contained in:
commit
2d1e7c9baf
13
app.js
13
app.js
|
@ -51,9 +51,14 @@ const APP = {
|
|||
status: "initialized",
|
||||
handler: null
|
||||
},
|
||||
// Used for automated performance tests
|
||||
performanceTimes: {
|
||||
"index.loaded": window.indexLoadedTime
|
||||
},
|
||||
UI,
|
||||
settings,
|
||||
conference,
|
||||
connection: null,
|
||||
API,
|
||||
init () {
|
||||
this.keyboardshortcut =
|
||||
|
@ -98,8 +103,9 @@ function obtainConfigAndInit() {
|
|||
// Get config result callback
|
||||
function(success, error) {
|
||||
if (success) {
|
||||
console.log("(TIME) configuration fetched:\t",
|
||||
window.performance.now());
|
||||
var now = APP.performanceTimes["configuration.fetched"] =
|
||||
window.performance.now();
|
||||
console.log("(TIME) configuration fetched:\t", now);
|
||||
init();
|
||||
} else {
|
||||
// Show obtain config error,
|
||||
|
@ -118,7 +124,8 @@ function obtainConfigAndInit() {
|
|||
|
||||
|
||||
$(document).ready(function () {
|
||||
console.log("(TIME) document ready:\t", window.performance.now());
|
||||
var now = APP.performanceTimes["document.ready"] = window.performance.now();
|
||||
console.log("(TIME) document ready:\t", now);
|
||||
|
||||
URLProcessor.setConfigParametersFromUrl();
|
||||
APP.init();
|
||||
|
|
|
@ -328,7 +328,7 @@ export default {
|
|||
]);
|
||||
}).then(([tracks, con]) => {
|
||||
console.log('initialized with %s local tracks', tracks.length);
|
||||
connection = con;
|
||||
APP.connection = connection = con;
|
||||
this._createRoom(tracks);
|
||||
this.isDesktopSharingEnabled =
|
||||
JitsiMeetJS.isDesktopSharingEnabled();
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<html itemscope itemtype="http://schema.org/Product" prefix="og: http://ogp.me/ns#" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
<!--#include virtual="title.html" -->
|
||||
<script>console.log("(TIME) index.html loaded:\t", window.performance.now());</script>
|
||||
<script>
|
||||
window.indexLoadedTime = window.performance.now();
|
||||
console.log("(TIME) index.html loaded:\t", indexLoadedTime);
|
||||
</script>
|
||||
<script src="config.js?v=15"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
|
||||
<script src="utils.js?v=1"></script>
|
||||
<!--#include virtual="connection_optimization/connection_optimization.html" -->
|
||||
|
|
|
@ -141,8 +141,10 @@ SmallVideo.createStreamElement = function (stream) {
|
|||
element.id = SmallVideo.getStreamElementID(stream);
|
||||
|
||||
element.onplay = function () {
|
||||
var now = APP.performanceTimes["video.render"]
|
||||
= window.performance.now();
|
||||
console.log("(TIME) Render " + (isVideo ? 'video' : 'audio') + ":\t",
|
||||
window.performance.now());
|
||||
now);
|
||||
};
|
||||
|
||||
element.oncontextmenu = function () { return false; };
|
||||
|
|
Loading…
Reference in New Issue