Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Stores measured times and exposes them

hristoterezov8d77088f6d86
diff --git a/app.js b/app.js
index cee8118e88..277cbb1610 100644
--- a/app.js
+++ b/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();
diff --git a/conference.js b/conference.js
index bc8775e817..c688578999 100644
--- a/conference.js
+++ b/conference.js
@@ -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();
diff --git a/index.html b/index.html
index 681a344298..47f73cca2f 100644
--- a/index.html
+++ b/index.html
@@ -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" -->
diff --git a/modules/UI/videolayout/SmallVideo.js b/modules/UI/videolayout/SmallVideo.js
index e20275b472..f40d2e9be2 100644
--- a/modules/UI/videolayout/SmallVideo.js
+++ b/modules/UI/videolayout/SmallVideo.js
@@ -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; };