constructor(format) {
    super();

    /**
     * The data format to be returned by getProfileData.
     * @private {!ee.data.Profiler.Format<T>}
     */
    this.format_ = format;

    /**
     * Whether to request profile data.
     *
     * This flag does not affect the behavior of the Profiler in collecting
     * profile data; it only controls whether getProfileHook() returns a hook,
     * and is used by other code (via isEnabled()) to to decide whether to
     * enable profiling.
     * @private {boolean}
     */
    this.isEnabled_ = false;

    /**
     * Non-null unique object if and only if we have a refresh request
     * outstanding.
     * @private {?Object}
     */
    this.lastRefreshToken_ = null;

    /**
     * All profile IDs contributing to the current combined profile. Keys are
     * IDs, values are reference counts for tile profiles or Infinity for other
     * profiles (which are never removed).
     * @private {!Object<number>}
     */
    this.profileIds_ = Object.create(null);

    /**
     * Maps map tile IDs (as defined by ee.MapLayerOverlay} to profile IDs, so
     * so that map tiles which are no longer in view can be removed from the
     * combined profile.
     * @private {!Object<string>}
     */
    this.tileProfileIds_ = Object.create(null);

    /**
     * Whether to show implementation details in the retrieved profiles.
     * This option requires additional privileges and will cause errors if set
     * to true by a normal user.
     * @private {boolean}
     */
    this.showInternal_ = false;

    /**
     * @private {?string}
     */
    this.profileError_ = null;

    /**
     * Helper to ensure we don't make too many profile requests.
     * See DELAY_BEFORE_REFRESH_ for rationale.
     * @private {!goog.async.Delay}
     */
    this.throttledRefresh_ = new goog.async.Delay(
        goog.bind(this.refresh_, this), ee.data.Profiler.DELAY_BEFORE_REFRESH_);

    /**
     * The combined profile data, to be displayed in the UI.
     * @private {T}
     */
    this.profileData_ = ee.data.Profiler.getEmptyProfile_(format);
    // Note: the above initialization also causes the value of format to be
    // validated.

    /**
     * Maximum retry count when performing a profile refresh.
     * @private @const {number}
     */
    this.MAX_RETRY_COUNT_ = 5;
  }
@param {!ee.data.Profiler.Format<T>} format The format of the data to be
    returned by getProfileData.