SharedTreeMergeHealthTelemetryHeartbeat Class
Aggregates and logs telemetry about the success of concurrent edits.
Signature
export declare class SharedTreeMergeHealthTelemetryHeartbeat
Methods
Method | Return Type | Description |
---|---|---|
attachTree(tree) | void | Adds a tree to the set of tree to log merge health telemetry for. Noop if such a tree was already in the set. |
clearData() | void | Resets all aggregated state. |
detachAllTrees() | void | Removes all trees from the set of tree to log merge health telemetry for. |
detachTree(tree) | void | Removes a tree from the set of tree to log merge health telemetry for. Noop if such a tree was never in the set. |
flushHeartbeat() | void | Sends all collected merge health data and resets the aggregated state. |
getStats(tree) | MergeHealthStats | Exposes the aggregated statistics about merge health for the given tree. |
resetTreeData(tree) | void | Resets the aggregated merge health data for the given tree. |
startHeartbeat(interval) | void | Enables the regular telemetry logging of merge health data. The first message will be sent after interval milliseconds. See flushHeartbeat() for immediate logging. |
stopHeartbeat() | void | Disables the regular telemetry logging of merge health data. |
Method Details
attachTree
Adds a tree to the set of tree to log merge health telemetry for. Noop if such a tree was already in the set.
Signature
attachTree(tree: SharedTree): void;
Parameters
Parameter | Type | Description |
---|---|---|
tree | SharedTree | The tree to log merge health telemetry for. |
clearData
Resets all aggregated state.
Signature
clearData(): void;
detachAllTrees
Removes all trees from the set of tree to log merge health telemetry for.
Signature
detachAllTrees(): void;
detachTree
Removes a tree from the set of tree to log merge health telemetry for. Noop if such a tree was never in the set.
Signature
detachTree(tree: SharedTree): void;
Parameters
Parameter | Type | Description |
---|---|---|
tree | SharedTree | The tree to stop logging merge health telemetry for. |
flushHeartbeat
Sends all collected merge health data and resets the aggregated state.
Signature
flushHeartbeat(): void;
getStats
Exposes the aggregated statistics about merge health for the given tree.
Signature
getStats(tree: SharedTree): MergeHealthStats;
Parameters
Parameter | Type | Description |
---|---|---|
tree | SharedTree | The tree to get stats for. |
Returns
Aggregated statistics about merge health for the given tree.
Return type: MergeHealthStats
resetTreeData
Resets the aggregated merge health data for the given tree.
Signature
resetTreeData(tree: SharedTree): void;
Parameters
Parameter | Type | Description |
---|---|---|
tree | SharedTree | The tree to reset the merge health data for. |
startHeartbeat
Enables the regular telemetry logging of merge health data. The first message will be sent after interval
milliseconds. See flushHeartbeat() for immediate logging.
Signature
startHeartbeat(interval?: number): void;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
interval | optional | number | The amount of time in milliseconds between log messages. |
stopHeartbeat
Disables the regular telemetry logging of merge health data.
Signature
stopHeartbeat(): void;