CPU times
Get day timeline of CPU times
GET /{website-id}/pages/{page-id}/cpu?device={device}
The device and date range are set using these querystring parameters:
| Querystring parameter | Description |
|---|---|
| date | The date range in yyyyMMdd-yyyyMMdd format. Defaults to last 90 days. Example: 20230401-20230501 |
| device | Mandatory. Either desktop or mobile |
The result looks like this:
{
"result": [
{
"date": "2023-03-31",
"cpu_total": 490,
"cpu_parse_html": 33,
"cpu_script_eval": 137,
"cpu_layout": 99,
"cpu_parse_script": 28,
"cpu_render": 30,
"cpu_gc": 0,
"cpu_other": 164
},
{
"date": "2023-04-01",
"cpu_total": 502,
"cpu_parse_html": 46,
"cpu_script_eval": 128,
"cpu_layout": 98,
"cpu_parse_script": 21,
"cpu_render": 22,
"cpu_gc": 0,
"cpu_other": 188
},
...
]
}The properties for each array item are:
| Property | Data type | Description |
|---|---|---|
| date | yyyyMMdd | The date that the metrics are averaged over |
| cpu_total | integer | Total ms used by the CPU when loading the page |
| cpu_parse_html | integer | CPU time (ms) used to parse HTML |
| cpu_parse_script | integer | CPU time (ms) used to parse JavaScript |
| cpu_script_eval | integer | CPU time (ms) used to run JavaScript |
| cpu_render | integer | CPU time (ms) used to render the DOM |
| cpu_layout | integer | CPU time (ms) used to layout/paint the page |
| cpu_gc | integer | CPU time (ms) used for garbage collection |
| cpu_other | integer | CPU time (ms) spent on any other task |