SyniInferenceMetric class

Typed view over the runtime's telemetry drain (syni_telemetry_json).

Parsing is defensive: unknown / missing / wrong-typed fields degrade to sensible defaults rather than throwing, so a runtime that adds fields (or an older one that omits them) never breaks the SDK. One recorded on-device inference. Mirrors the runtime's InferenceMetrics.

Constructors

SyniInferenceMetric({required int startedAtUnixMs, required int durationMs, required String preset, required bool success, required bool schemaValid, required int retries, required bool fallbackUsed, String? errorCode, String? fallbackReason, SyniFallbackDiagnostics? diagnostics})
const
SyniInferenceMetric.fromMap(Map<String, dynamic> m)
factory

Properties

diagnostics SyniFallbackDiagnostics?
Root-cause debugging context — present only on a fallback.
final
durationMs int
final
errorCode String?
Stable code the fallback papered over (TIMEOUT, SCHEMA, …), or null.
final
fallbackReason String?
Raw reason paired with errorCode, or null.
final
fallbackUsed bool
Whether a deterministic fallback was substituted for model output.
final
hashCode int
The hash code for this object.
no setterinherited
preset String
final
retries int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schemaValid bool
final
startedAtUnixMs int
final
success bool
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited