code: function profile(target, propertyKey, descriptor) {
      if (flags_1.IS_PROFILE) {
          return performProfile(target, propertyKey, descriptor);
      }
      else {
          // return as-is
          return descriptor;
      }
  }
docs: A decorator that can profile a function.