function getData() {
var timestamp = performance.now();
return new Bluebird(function (resolve, reject) {
// ...
throw new Error('Unexpected problem');
}).finally(function () {
console.log('Data fetch took ' + (performance.now() - timestamp));
});
}