ガイド
Firebase パフォーマンスのチュートリアル
使用する @capgo/capacitor-firebase-performance
Capacitor プラグインの Firebase パフォーマンス監視
インストール
bun add @capgo/capacitor-firebase-performance
bunx cap sync
このプラグインが公開するもの
startTrace- トレースを開始します。stopTrace- トレースを停止します。incrementMetric- 指定された名前のメトリクスを選択したトレースで、指定された値で原子的にインクリメントします。incrementBy- パフォーマンス監視を有効または無効にします。アプリの次の起動時に適用されます。setEnabled例の使用
トレースを開始します。
startTrace
このプラグインはFirebaseパフォーマンス監視を有効にするために使用します。
import { FirebasePerformance } from '@capgo/capacitor-firebase-performance';
await FirebasePerformance.startTrace({} as StartTraceOptions);
stopTrace
Stops a trace.
import { FirebasePerformance } from '@capgo/capacitor-firebase-performance';
await FirebasePerformance.stopTrace({} as StopTraceOptions);
incrementMetric
Atomically increments the metric with the given name for the selected trace by the incrementBy value.
import { FirebasePerformance } from '@capgo/capacitor-firebase-performance';
await FirebasePerformance.incrementMetric({} as IncrementMetricOptions);
setEnabled
Enables or disables performance monitoring. Will be applied with the next start of the app.
import { FirebasePerformance } from '@capgo/capacitor-firebase-performance';
await FirebasePerformance.setEnabled({} as SetEnabledOptions);
Full Reference
- https://GitHub.com/Cap-go/__CAPGO_KEEP_1__-firebase/tree/main/packages/performance https://github.com/Cap-go/capacitor-firebase/tree/main/packages/performance
- __CAPGO_KEEP_0__:
Keep going from Using @capgo/capacitor-firebase-performance
If you are using Using @capgo/capacitor-firebase-performance to plan native plugin work, connect it with Capgo プラグイン ディレクトリ Capgo プラグイン ディレクトリの製品ワークフローについて Capacitor プラグイン (Capgo によって提供) Capacitor プラグイン (Capgo によって提供)の実装詳細について プラグインの追加または更新 プラグインの追加または更新の実装詳細について Ionic Enterprise プラグインの代替 Ionic Enterprise プラグインの代替の製品ワークフローについて、 Capgo ネイティブ ビルド Capgo ネイティブ ビルドの製品ワークフローについて