Call eventStart
to start timing for an event. Configure the name of the event, and event properties to report. When the event comes to an end, a "_duration" property will automatically be added for this event (unit: millisecond). It should be noted that there can only be one timing task for the same event.
Function
export function eventStart(eventName:string);
Parameter | Description | Type | Required |
---|---|---|---|
eventName | Developer custom event name | String | Yes |
Sample Code
let eventName = "time_event_name";
SolarEngine.eventStart(eventName);
Call eventFinish to report duration event:
Function
export function eventEnd(eventName:string,properties:Object);
Parameter | Description | Type | Required |
---|---|---|---|
eventName | Custom duration event name | string | Yes |
properties | Duration event custom properties | Object | No |
Sample Code
let eventName = "your_event_name";
let properties = { ... }
SolarEngine.eventEnd(eventName,properties);
Note:
When reporting the preset event _appEnd, the duration starting from the last _appStart will be reported by default. That is, the duration of an exit event does not need to be configured to start timing, and will be assigned a value by default.