메인 콘텐츠로 건너뛰기
플러그인으로 돌아가기
@capgo/capacitor-firebase-performance
튜토리얼
github.com/Cap-go에서 github

파이어베이스 퍼포먼스

Capacitor 플러그인: 파이어베이스 퍼포먼스 모니터링

안내서

Firebase 성능에 대한 튜토리얼

capgo의 capacitor-firebase-performance를 사용하여

Capacitor의 Firebase 성능 모니터링 플러그인

설치

bun add @capgo/capacitor-firebase-performance
bunx cap sync

이 플러그인이 노출하는 것

  • startTrace - 트레이스를 시작합니다.
  • stopTrace - 트레이스를 중지합니다.
  • incrementMetric - 선택한 트레이스에서 지정된 이름의 메트릭을 원자적으로 증가시킵니다. incrementBy - 증가하는 값.
  • setEnabled - 애플리케이션 시작 시에 성능 모니터링을 활성화하거나 비활성화합니다. 다음 애플리케이션 시작 시에 적용됩니다.

예시 사용

startTrace

트레이스를 시작합니다.

import { FirebasePerformance } from '@capgo/capacitor-firebase-performance';

await FirebasePerformance.startTrace({} as StartTraceOptions);

stopTrace

트레이스를 중지합니다.

import { FirebasePerformance } from '@capgo/capacitor-firebase-performance';

await FirebasePerformance.stopTrace({} as StopTraceOptions);

incrementMetric

__CAPGO_KEEP_0__:를 선택한 트레이스에 __CAPGO_KEEP_0__:를 __CAPGO_KEEP_1__:로 증가시킵니다. incrementBy - 애플리케이션 시작 시에 성능 모니터링을 활성화하거나 비활성화합니다. 다음 애플리케이션 시작 시에 적용됩니다.

import { FirebasePerformance } from '@capgo/capacitor-firebase-performance';

await FirebasePerformance.incrementMetric({} as IncrementMetricOptions);

setEnabled

전체 참조

import { FirebasePerformance } from '@capgo/capacitor-firebase-performance';

await FirebasePerformance.setEnabled({} as SetEnabledOptions);

__CAPGO_KEEP_0__: