* @param {!ee.data.Profiler.Format } format The format of the data to be * returned by getProfileData.
(format)
| 26 | * returned by getProfileData. |
| 27 | */ |
| 28 | constructor(format) { |
| 29 | super(); |
| 30 | |
| 31 | /** |
| 32 | * The data format to be returned by getProfileData. |
| 33 | * @private {!ee.data.Profiler.Format<T>} |
| 34 | */ |
| 35 | this.format_ = format; |
| 36 | |
| 37 | /** |
| 38 | * Whether to request profile data. |
| 39 | * |
| 40 | * This flag does not affect the behavior of the Profiler in collecting |
| 41 | * profile data; it only controls whether getProfileHook() returns a hook, |
| 42 | * and is used by other code (via isEnabled()) to to decide whether to |
| 43 | * enable profiling. |
| 44 | * @private {boolean} |
| 45 | */ |
| 46 | this.isEnabled_ = false; |
| 47 | |
| 48 | /** |
| 49 | * Non-null unique object if and only if we have a refresh request |
| 50 | * outstanding. |
| 51 | * @private {?Object} |
| 52 | */ |
| 53 | this.lastRefreshToken_ = null; |
| 54 | |
| 55 | /** |
| 56 | * All profile IDs contributing to the current combined profile. Keys are |
| 57 | * IDs, values are reference counts for tile profiles or Infinity for other |
| 58 | * profiles (which are never removed). |
| 59 | * @private {!Object<number>} |
| 60 | */ |
| 61 | this.profileIds_ = Object.create(null); |
| 62 | |
| 63 | /** |
| 64 | * Maps map tile IDs (as defined by ee.MapLayerOverlay} to profile IDs, so |
| 65 | * so that map tiles which are no longer in view can be removed from the |
| 66 | * combined profile. |
| 67 | * @private {!Object<string>} |
| 68 | */ |
| 69 | this.tileProfileIds_ = Object.create(null); |
| 70 | |
| 71 | /** |
| 72 | * Whether to show implementation details in the retrieved profiles. |
| 73 | * This option requires additional privileges and will cause errors if set |
| 74 | * to true by a normal user. |
| 75 | * @private {boolean} |
| 76 | */ |
| 77 | this.showInternal_ = false; |
| 78 | |
| 79 | /** |
| 80 | * @private {?string} |
| 81 | */ |
| 82 | this.profileError_ = null; |
| 83 | |
| 84 | /** |
| 85 | * Helper to ensure we don't make too many profile requests. |
nothing calls this directly
no test coverage detected