toJson method
Implementation
Map<String, dynamic> toJson() => {
'path': path.name,
'seriesCount': seriesCount,
'dataPointCount': dataPointCount,
'effectiveDataPointCount': effectiveDataPointCount,
'sampleInputPointCount': sampleInputPointCount,
'isViewportReduced': isViewportReduced,
'effectiveDataPointRatio': effectiveDataPointRatio,
'viewportReductionRatio': viewportReductionRatio,
'outputPointCount': outputPointCount,
'wasDownsampled': wasDownsampled,
'reducedPointCount': reducedPointCount,
'samplingOutputRatio': samplingOutputRatio,
'samplingReductionRatio': samplingReductionRatio,
'renderThreshold': renderThreshold,
'samplingStrategy': samplingStrategy?.name ?? 'auto',
'resolvedSamplingStrategy': resolvedSamplingStrategy.name,
'resolvedSamplingStrategies': [
for (final strategy in resolvedSamplingStrategies) strategy.name,
],
'startIndex': startIndex,
'endIndex': endIndex,
'cacheEligible': cacheEligible,
'extractionCacheEligible': extractionCacheEligible,
'cacheAdmissionReason': cacheAdmissionReason.name,
'extractionCacheAdmissionReason': extractionCacheAdmissionReason.name,
'cacheAdmissionHint': cacheAdmissionHint,
'extractionCacheAdmissionHint': extractionCacheAdmissionHint,
'cacheRecommendedAction': cacheRecommendedAction.name,
'extractionCacheRecommendedAction': extractionCacheRecommendedAction.name,
'cacheRecommendationSeverity': cacheRecommendationSeverity.name,
'extractionCacheRecommendationSeverity':
extractionCacheRecommendationSeverity.name,
'cachePolicy': cachePolicy.toJson(),
'cacheHit': cacheHit,
if (dataSignature != null) 'dataSignature': dataSignature,
'performanceSummary': performanceSummary.toJson(),
'durationsMicros': {
'total': totalDuration.inMicroseconds,
'extraction': extractionDuration.inMicroseconds,
'window': windowDuration.inMicroseconds,
'stats': statsDuration.inMicroseconds,
'sampling': samplingDuration.inMicroseconds,
'pointBuild': pointBuildDuration.inMicroseconds,
},
};