src/aria/utils/Profiling.js
function () {
            this._logsPerClasspath = {};
            var i, j, iLog, jLog, max, end;
            max = 0;
            for (i = 0; i < this._nbLogs; i++) {
                iLog = this._logs[i];
                if (iLog.start && !("length" in iLog)) {
                    for (j = i + 1; j < this._nbLogs; j++) {
                        jLog = this._logs[j];
                        if (jLog.stop && jLog.classpath == iLog.classpath) {
                            if (!jLog.id || iLog.id === jLog.id) {
                                this._logs.splice(j, 1);
                                this._nbLogs--;
                                iLog.length = jLog.stop - iLog.start;
                                iLog.start = iLog.start - this._startTime;
                                break;
                            }
                        }
                    }
                    if (!("length" in iLog)) {
                        // no matching call to $stopMeasure
                        iLog.length = 0;
                        iLog.start = iLog.start - this._startTime;
                    }
                } else if (iLog.timestamp) {
                    iLog.start = iLog.timestamp - this._startTime;
                    iLog.length = 0;
                    delete iLog.timestamp;
                }

                if (!("msg" in iLog)) {
                    iLog.msg = 'NO MESSAGE';
                }

                end = iLog.start + iLog.length;
                if (end > max) {
                    max = end;
                }

                // add in processed logs object
                if (!this._logsPerClasspath[iLog.classpath]) {
                    this._logsPerClasspath[iLog.classpath] = {};
                }
                var cpLog = this._logsPerClasspath[iLog.classpath];
                if (!cpLog[iLog.msg]) {
                    cpLog[iLog.msg] = [0];
                }
                cpLog[iLog.msg].push(iLog);
                cpLog[iLog.msg][0] += iLog.length;
            }
            this._logsPerClasspath._max = max;
        }
function () {
            this._logsPerClasspath = {};
            var i, j, iLog, jLog, max, end;
            max = 0;
            for (i = 0; i < this._nbLogs; i++) {
                iLog = this._logs[i];
                if (iLog.start && !("length" in iLog)) {
                    for (j = i + 1; j < this._nbLogs; j++) {
                        jLog = this._logs[j];
                        if (jLog.stop && jLog.classpath == iLog.classpath) {
                            if (!jLog.id || iLog.id === jLog.id) {
                                this._logs.splice(j, 1);
                                this._nbLogs--;
                                iLog.length = jLog.stop - iLog.start;
                                iLog.start = iLog.start - this._startTime;
                                break;
                            }
                        }
                    }
                    if (!("length" in iLog)) {
                        // no matching call to $stopMeasure
                        iLog.length = 0;
                        iLog.start = iLog.start - this._startTime;
                    }
                } else if (iLog.timestamp) {
                    iLog.start = iLog.timestamp - this._startTime;
                    iLog.length = 0;
                    delete iLog.timestamp;
                }

                if (!("msg" in iLog)) {
                    iLog.msg = 'NO MESSAGE';
                }

                end = iLog.start + iLog.length;
                if (end > max) {
                    max = end;
                }

                // add in processed logs object
                if (!this._logsPerClasspath[iLog.classpath]) {
                    this._logsPerClasspath[iLog.classpath] = {};
                }
                var cpLog = this._logsPerClasspath[iLog.classpath];
                if (!cpLog[iLog.msg]) {
                    cpLog[iLog.msg] = [0];
                }
                cpLog[iLog.msg].push(iLog);
                cpLog[iLog.msg][0] += iLog.length;
            }
            this._logsPerClasspath._max = max;
        }
function ( ) { this . _logsPerClasspath = { } ; var i , j , iLog , jLog , max , end ; max = 0 ; for ( i = 0 ; i < this . _nbLogs ; i ++ ) { iLog = this . _logs [ i ] ; if ( iLog . start && ! ( "length" in iLog ) ) { for ( j = i + 1 ; j < this . _nbLogs ; j ++ ) { jLog = this . _logs [ j ] ; if ( jLog . stop && jLog . classpath == iLog . classpath ) { if ( ! jLog . id || iLog . id === jLog . id ) { this . _logs . splice ( j , 1 ) ; this . _nbLogs -- ; iLog . length = jLog . stop - iLog . start ; iLog . start = iLog . start - this . _startTime ; break ; } } } if ( ! ( "length" in iLog ) ) { // no matching call to $stopMeasure iLog . length = 0 ; iLog . start = iLog . start - this . _startTime ; } } else if ( iLog . timestamp ) { iLog . start = iLog . timestamp - this . _startTime ; iLog . length = 0 ; delete iLog . timestamp ; } if ( ! ( "msg" in iLog ) ) { iLog . msg = 'NO MESSAGE' ; } end = iLog . start + iLog . length ; if ( end > max ) { max = end ; } // add in processed logs object if ( ! this . _logsPerClasspath [ iLog . classpath ] ) { this . _logsPerClasspath [ iLog . classpath ] = { } ; } var cpLog = this . _logsPerClasspath [ iLog . classpath ] ; if ( ! cpLog [ iLog . msg ] ) { cpLog [ iLog . msg ] = [ 0 ] ; } cpLog [ iLog . msg ] . push ( iLog ) ; cpLog [ iLog . msg ] [ 0 ] += iLog . length ; } this . _logsPerClasspath . _max = max ; }
Process measures to associate starts and stops, sort by classpath
Process measures to associate starts and stops sort by classpath