mirror of
https://github.com/nasa/openmct.git
synced 2024-12-21 14:07:50 +00:00
Telemetry Table performance marks (#5107)
Co-authored-by: unlikelyzero <jchill2@gmail.com> Co-authored-by: David Tsay <3614296+davetsay@users.noreply.github.com>
This commit is contained in:
parent
5236f1c796
commit
db5cb2517f
@ -172,6 +172,7 @@ export class TelemetryCollection extends EventEmitter {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_processNewTelemetry(telemetryData) {
|
_processNewTelemetry(telemetryData) {
|
||||||
|
performance.mark('tlm:process:start');
|
||||||
if (telemetryData === undefined) {
|
if (telemetryData === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -352,6 +353,7 @@ export class TelemetryCollection extends EventEmitter {
|
|||||||
* @todo handle subscriptions more granually
|
* @todo handle subscriptions more granually
|
||||||
*/
|
*/
|
||||||
_reset() {
|
_reset() {
|
||||||
|
performance.mark('tlm:reset');
|
||||||
this.boundedTelemetry = [];
|
this.boundedTelemetry = [];
|
||||||
this.futureBuffer = [];
|
this.futureBuffer = [];
|
||||||
|
|
||||||
|
@ -225,8 +225,9 @@ define(
|
|||||||
sortBy(sortOptions) {
|
sortBy(sortOptions) {
|
||||||
if (arguments.length > 0) {
|
if (arguments.length > 0) {
|
||||||
this.sortOptions = sortOptions;
|
this.sortOptions = sortOptions;
|
||||||
|
performance.mark('table:row:sort:start');
|
||||||
this.rows = _.orderBy(this.rows, (row) => row.getParsedValue(sortOptions.key), sortOptions.direction);
|
this.rows = _.orderBy(this.rows, (row) => row.getParsedValue(sortOptions.key), sortOptions.direction);
|
||||||
|
performance.mark('table:row:sort:stop');
|
||||||
this.emit('sort');
|
this.emit('sort');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -613,6 +613,7 @@ export default {
|
|||||||
this.calculateScrollbarWidth();
|
this.calculateScrollbarWidth();
|
||||||
},
|
},
|
||||||
sortBy(columnKey) {
|
sortBy(columnKey) {
|
||||||
|
performance.mark('table:sort');
|
||||||
// If sorting by the same column, flip the sort direction.
|
// If sorting by the same column, flip the sort direction.
|
||||||
if (this.sortOptions.key === columnKey) {
|
if (this.sortOptions.key === columnKey) {
|
||||||
if (this.sortOptions.direction === 'asc') {
|
if (this.sortOptions.direction === 'asc') {
|
||||||
@ -669,6 +670,7 @@ export default {
|
|||||||
this.setHeight();
|
this.setHeight();
|
||||||
},
|
},
|
||||||
rowsAdded(rows) {
|
rowsAdded(rows) {
|
||||||
|
performance.mark('row:added');
|
||||||
this.setHeight();
|
this.setHeight();
|
||||||
|
|
||||||
let sizingRow;
|
let sizingRow;
|
||||||
@ -690,6 +692,7 @@ export default {
|
|||||||
this.updateVisibleRows();
|
this.updateVisibleRows();
|
||||||
},
|
},
|
||||||
rowsRemoved(rows) {
|
rowsRemoved(rows) {
|
||||||
|
performance.mark('row:removed');
|
||||||
this.setHeight();
|
this.setHeight();
|
||||||
this.updateVisibleRows();
|
this.updateVisibleRows();
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user