tauri-plugin-profiling
A Tauri v2 plugin for CPU profiling with flamegraph generation.
Provides actual CPU profiling using sampling-based techniques, complementing tauri-plugin-tracing which provides span timing (wall-clock time including I/O waits).
| Platform | Backend |
|---|---|
| macOS/Linux | pprof-rs (SIGPROF) |
| Windows | SuspendThread + StackWalk64 |
Installation
[]
= { = "https://github.com/fltsci/tauri-plugin-profiling" }
Usage
Rust
use ProfilingExt;
default
.plugin
.setup
JavaScript
import { startCpuProfile, stopCpuProfile, withProfiling } from '@tauri-apps/plugin-profiling';
await startCpuProfile({ frequency: 100 });
await doExpensiveOperation();
const result = await stopCpuProfile();
// Or use the convenience wrapper
const { result, profile } = await withProfiling(async () => processData());
License
MIT OR Apache-2.0