Additional logging for perf analysis and cross-device debuging
- How long it takes to get a message through the pre-send checks - How long it takes to open a conversation for the first time - The timestamp of any message we send to corellate with other logs - Add conversation ID to 'decrypt old identity key errors' start/end FREEBIE
This commit is contained in:
parent
f15bdad4b3
commit
680f7d8b57
2 changed files with 9 additions and 2 deletions
|
@ -230,7 +230,7 @@
|
||||||
if (this.get('decryptedOldIncomingKeyErrors')) {
|
if (this.get('decryptedOldIncomingKeyErrors')) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
console.log('decryptOldIncomingKeyErrors start');
|
console.log('decryptOldIncomingKeyErrors start for', this.id);
|
||||||
|
|
||||||
var messages = this.messageCollection.filter(function(message) {
|
var messages = this.messageCollection.filter(function(message) {
|
||||||
var errors = message.get('errors');
|
var errors = message.get('errors');
|
||||||
|
@ -245,7 +245,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
var markComplete = function() {
|
var markComplete = function() {
|
||||||
console.log('decryptOldIncomingKeyErrors complete');
|
console.log('decryptOldIncomingKeyErrors complete for', this.id);
|
||||||
return new Promise(function(resolve) {
|
return new Promise(function(resolve) {
|
||||||
this.save({decryptedOldIncomingKeyErrors: true}).always(resolve);
|
this.save({decryptedOldIncomingKeyErrors: true}).always(resolve);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
@ -559,6 +559,7 @@
|
||||||
sendMessage: function(body, attachments) {
|
sendMessage: function(body, attachments) {
|
||||||
this.queueJob(function() {
|
this.queueJob(function() {
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
|
console.log('Sending message to conversation', this.id, 'with timestamp', now);
|
||||||
var message = this.messageCollection.add({
|
var message = this.messageCollection.add({
|
||||||
body : body,
|
body : body,
|
||||||
conversationId : this.id,
|
conversationId : this.id,
|
||||||
|
|
|
@ -419,12 +419,15 @@
|
||||||
onLoaded: function () {
|
onLoaded: function () {
|
||||||
var view = this.loadingScreen;
|
var view = this.loadingScreen;
|
||||||
if (view) {
|
if (view) {
|
||||||
|
var openDelta = Date.now() - this.openStart;
|
||||||
|
console.log('Conversation', this.model.id, 'took', openDelta, 'milliseconds to load');
|
||||||
this.loadingScreen = null;
|
this.loadingScreen = null;
|
||||||
view.remove();
|
view.remove();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onOpened: function() {
|
onOpened: function() {
|
||||||
|
this.openStart = Date.now();
|
||||||
this.lastActivity = Date.now();
|
this.lastActivity = Date.now();
|
||||||
|
|
||||||
this.statusFetch = this.throttledGetProfiles().then(function() {
|
this.statusFetch = this.throttledGetProfiles().then(function() {
|
||||||
|
@ -866,6 +869,7 @@
|
||||||
|
|
||||||
checkUnverifiedSendMessage: function(e, options) {
|
checkUnverifiedSendMessage: function(e, options) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
this.sendStart = Date.now();
|
||||||
this.$messageField.prop('disabled', true);
|
this.$messageField.prop('disabled', true);
|
||||||
|
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
@ -946,6 +950,8 @@
|
||||||
|
|
||||||
if (message.length > 0 || this.fileInput.hasFiles()) {
|
if (message.length > 0 || this.fileInput.hasFiles()) {
|
||||||
this.fileInput.getFiles().then(function(attachments) {
|
this.fileInput.getFiles().then(function(attachments) {
|
||||||
|
var sendDelta = Date.now() - this.sendStart;
|
||||||
|
console.log('Send pre-checks took', sendDelta, 'milliseconds');
|
||||||
this.model.sendMessage(message, attachments);
|
this.model.sendMessage(message, attachments);
|
||||||
input.val("");
|
input.val("");
|
||||||
this.focusMessageField();
|
this.focusMessageField();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue