mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
2 lines
5.1 KiB
JavaScript
2 lines
5.1 KiB
JavaScript
|
/*! For license information please see ffe5dd79.ebd7948c.js.LICENSE.txt */
|
||
|
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8784],{29221:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>t,metadata:()=>c,toc:()=>o});var s=r(85893),i=r(11151);const t={sidebar_label:"Page.metrics"},a="Page.metrics() method",c={id:"api/puppeteer.page.metrics",title:"Page.metrics() method",description:"Object containing metrics as key/value pairs.",source:"@site/versioned_docs/version-22.0.0/api/puppeteer.page.metrics.md",sourceDirName:"api",slug:"/api/puppeteer.page.metrics",permalink:"/api/puppeteer.page.metrics",draft:!1,unlisted:!1,tags:[],version:"22.0.0",frontMatter:{sidebar_label:"Page.metrics"},sidebar:"api",previous:{title:"Page.mainFrame",permalink:"/api/puppeteer.page.mainframe"},next:{title:"Page.pdf",permalink:"/api/puppeteer.page.pdf"}},l={},o=[{value:"Signature:",id:"signature",level:4},{value:"Remarks",id:"remarks",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"pagemetrics-method",children:"Page.metrics() method"}),"\n",(0,s.jsx)(n.p,{children:"Object containing metrics as key/value pairs."}),"\n",(0,s.jsx)(n.h4,{id:"signature",children:"Signature:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:"class Page {\n abstract metrics(): Promise<Metrics>;\n}\n"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Returns:"})}),"\n",(0,s.jsxs)(n.p,{children:["Promise<",(0,s.jsx)(n.a,{href:"/api/puppeteer.metrics",children:"Metrics"}),">"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Timestamp"})," : The timestamp when the metrics sample was taken."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Documents"})," : Number of documents in the page."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Frames"})," : Number of frames in the page."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"JSEventListeners"})," : Number of events in the page."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Nodes"})," : Number of DOM nodes in the page."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"LayoutCount"})," : Total number of full or partial page layout."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"RecalcStyleCount"})," : Total number of page style recalculations."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"LayoutDuration"})," : Combined durations of all page layouts."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"RecalcStyleDuration"})," : Combined duration of all page style recalculations."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"ScriptDuration"})," : Combined duration of JavaScript execution."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"TaskDuration"})," : Combined duration of all tasks performed by the browser."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"JSHeapUsedSize"})," : Used JavaScript heap size."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"JSHeapTotalSize"})," : Total JavaScript heap size."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"remarks",children:"Remarks"}),"\n",(0,s.jsx)(n.p,{children:"All timestamps are in monotonic time: monotonically increasing time in seconds since an arbitrary point in the past."})]})}function p(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n
|