Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AGCAPMSGameService

Hierarchy

  • AGCAPMSGameService

Index

Methods

enableGamePlugin

  • enableGamePlugin(enabled: boolean): void
  • en

    Enable or disable APM Game Plugin service. The default value is true (enabled), which means that the APM Game Plugin application performance data collection is enabled. If you need to disable the APM Game Plugin application performance data collection, you can set the value to false

    zh

    设置APM Game Plugin服务开关。开关的默认值为true(打开),表示启用APM Game Plugin应用性能数据采集。如果需要停用APM Game Plugin应用性能数据采集,可将开关值设为false(关闭)

    example
    huawei.agc.apms.game.apmsGameService.enableGamePlugin(true);
    

    Parameters

    • enabled: boolean

      enable or not

    Returns void

setCurrentGameAttribute

  • en

    Save current game attribute

    zh

    保存当前游戏属性

    example
    const gameAttribute = new huawei.agc.apms.game.GameAttribute('Game', huawei.agc.apms.game.LoadingState.LOADING);
    huawei.agc.apms.game.apmsGameService.setCurrentGameAttribute(gameAttribute);
    

    Parameters

    Returns void

setReportMinRate

  • setReportMinRate(intervalMin: number): void
  • en

    Set the reporting frequency of game performance data, unit: minutes

    zh

    设置游戏性能数据上报频率,单位:分钟

    example
    huawei.agc.apms.game.apmsGameService.setReportMinRate(5);
    

    Parameters

    • intervalMin: number

      reporting frequency, unit: minutes

    Returns void

start

  • start(): void
  • en

    Start APM Game Plugin service

    zh

    开始APM Game Plugin服务

    example
    huawei.agc.apms.game.apmsGameService.start();
    

    Returns void

startLoadingScene

  • en

    Start recording scene loading time

    zh

    开始记录场景加载时间

    example

    Parameters

    Returns string

    the name of the game scene

    const gameAttribute = new huawei.agc.apms.game.GameAttribute('Game', huawei.agc.apms.game.LoadingState.LOADING);
    huawei.agc.apms.game.apmsGameService.startLoadingScene(gameAttribute);
    

stop

  • stop(): void
  • en

    Stop APM Game Plugin service

    zh

    停止APM Game Plugin服务

    example
    huawei.agc.apms.game.apmsGameService.stop();
    

    Returns void

stopLoadingScene

  • stopLoadingScene(scene: string): void
  • en

    Stop recording scene loading time

    zh

    停止记录场景加载时间

    example
    huawei.agc.apms.game.apmsGameService.stopLoadingScene('Game');
    

    Parameters

    • scene: string

      the name of the scene

    Returns void

Generated using TypeDoc