Call the 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.
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
eventName | Developer custom event name | String | Yes |
Call example:
solarengine.eventStart("test");
Call eventFinish to report the duration event.
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
eventName | Developer custom duration event name | string | Yes |
customProperties | Developer custom duration event properties | object | No |
Call example:
let customProperties = {
test1:"key1",
test2:2,
test3:[1,"2"]
}
solarengine.eventFinish("test",customProperties);
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.