diff --git a/awx/ui/static/js/debug.js b/awx/ui/static/js/debug.js index 81c5624587..29cd88a8fc 100644 --- a/awx/ui/static/js/debug.js +++ b/awx/ui/static/js/debug.js @@ -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 */ +