mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
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