printSyntheticBenchmarkReport function
Implementation
void printSyntheticBenchmarkReport(Map<String, Object?> report) {
stdout.writeln('dart_mlx_ffi model benchmark');
stdout.writeln('mlx_version: ${report['mlx_version']}');
stdout.writeln('device: ${report['device']}');
stdout.writeln('metal: ${report['metal']}');
stdout.writeln('warmup: ${report['warmup']}');
stdout.writeln('iters: ${report['iters']}');
for (final model in (report['models'] as List<Object?>).cast<Map<String, Object?>>()) {
stdout.writeln('');
stdout.writeln('${model['name']}: ${model['description']}');
stdout.writeln(' output_shape: ${model['output_shape']}');
stdout.writeln(' output_preview: ${model['output_preview']}');
stdout.writeln(' per_iter_ms: ${(model['per_iter_ms'] as double).toStringAsFixed(4)}');
stdout.writeln(' peak_bytes_delta: ${model['peak_bytes_delta']}');
}
}