Skip to main content

edgepulse 0.2.2 copy "edgepulse: ^0.2.2" to clipboard
edgepulse: ^0.2.2 copied to clipboard

Flutter plugin for EdgePulse — captures real memory, thermal state, battery, and CPU on Android and iOS during on-device AI inference.

edgepulse #

Flutter plugin for EdgePulse — runtime observability for on-device AI.

pub package

EdgePulse captures real-time device metrics (Memory RSS, thermal state, battery draw, and CPU usage) on Android and iOS via native platform channels during on-device AI inference execution.


Features #

  • Real Device Metrics: Captures actual process memory (RSS), thermal state, battery current draw/level, and CPU utilization.
  • Android & iOS Support: Kotlin native plugin (Debug.getPss(), PowerManager, /proc/stat) and iOS Swift native plugin (mach_task_basic_info, ProcessInfo, host_statistics).
  • Core Compatibility: Seamlessly integrates with edgepulse_core models, PulseRunner, and exporters (JSON, Markdown, CSV).

Installation #

Add edgepulse to your pubspec.yaml:

dependencies:
  edgepulse: ^0.2.0

Usage #

import 'package:flutter/material.dart';
import 'package:edgepulse/edgepulse.dart';

Future<void> main() async {
  final pulse = EdgePulse(
    collector: PlatformMetricCollector(),
    config: const TraceConfig(
      measuredRuns: 5,
      warmupRuns: 1,
      collectThermal: true,
      collectBattery: true,
      collectCpu: true,
    ),
  );

  await pulse.initialize();

  final traces = await pulse.traceMany(
    modelId: 'mobilenet_v3',
    modelFormat: 'tflite',
    run: () async {
      // Execute your model inference here
      await Future<void>.delayed(const Duration(milliseconds: 120));
    },
  );

  await pulse.dispose();

  final markdownReport = pulse.exportMarkdown(traces);
  print(markdownReport);
}

Documentation #

For full documentation and core utilities, visit the EdgePulse GitHub repository.

0
likes
160
points
447
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter plugin for EdgePulse — captures real memory, thermal state, battery, and CPU on Android and iOS during on-device AI inference.

Repository (GitHub)
View/report issues
Contributing

Topics

#flutter #plugin #observability #performance #profiling

License

MIT (license)

Dependencies

edgepulse_core, flutter

More

Packages that depend on edgepulse

Packages that implement edgepulse