SyncMetrics class
Metrics and telemetry for SyncLayer SDK
Tracks sync performance, success rates, and error patterns.
Properties
- averageSyncDuration → Duration?
-
Average sync duration
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- successRate → double
-
Success rate (0.0 to 1.0)
no setter
-
topErrors
→ List<
MapEntry< String, int> > -
Top 5 most common errors
no setter
Methods
-
getSnapshot(
) → SyncMetricsSnapshot - Get current metrics snapshot
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recordConflictDetected(
String collection, String recordId) → void - Record conflict detected
-
recordConflictResolved(
String collection, String recordId) → void - Record conflict resolved
-
recordOperationFailed(
String operationType, String error) → void - Record operation failed
-
recordOperationQueued(
String operationType) → void - Record operation queued
-
recordOperationSynced(
String operationType) → void - Record operation synced
-
recordSyncAttempt(
) → void - Record sync attempt
-
recordSyncFailure(
String error) → void - Record sync failure
-
recordSyncSuccess(
) → void - Record sync success
-
reset(
) → void - Reset all metrics
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → SyncMetrics
-
no setter
Static Methods
-
setCustomHandler(
void handler(SyncMetricEvent event)?) → void - Set custom metrics handler