mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-02 14:11:48 -05:00
Add timeline recording helper to debug
This commit is contained in:
@@ -43,3 +43,16 @@ export function __deferLoadIfEnabled() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* jshint ignore:start */
|
||||
export function time(fn, label) {
|
||||
return function() {
|
||||
console.timeline(label);
|
||||
return _.tap(fn.apply(this, arguments), function() {
|
||||
console.timelineEnd(label);
|
||||
});
|
||||
};
|
||||
}
|
||||
/* jshint ignore:end */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user