"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[29134],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>k});vara=r(67294);functionn(e,t,r){returntine?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}functioni(e,t){varr=Object.keys(e);if(Object.getOwnPropertySymbols){vara=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}returnr}functionp(e){for(vart=1;t<arguments.length;t++){varr=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}returne}functionl(e,t){if(null==e)return{};varr,a,n=function(e,t){if(null==e)return{};varr,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||(n[r]=e[r]);returnn}(e,t);if(Object.getOwnPropertySymbols){vari=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}returnn}varo=a.createContext({}),m=function(e){vart=a.useContext(o),r=t;returne&&(r="function"==typeofe?e(t):p(p({},t),e)),r},s=function(e){vart=m(e.components);returna.createElement(o.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){vart=e.children;returna.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){varr=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=m(r),k=n,d=c["".concat(o,".").concat(k)]||c[k]||u[k]||i;returnr?a.createElement(d,p(p({ref:t},s),{},{components:r})):a.createElement(d,p({ref:t},s))}));functionk(e,t){varr=arguments,n=t&&t.mdxType;if("string"==typeofe||n){vari=r.length,p=newArray(i);p[0]=c;varl={};for(varoint)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l.mdxType="string"==typeofe?e:n,p[1]=l;for(varm=2;m<i;m++)p[m]=r[m];returna.createElement.apply(null,p)}returna.createElement.apply(null,r)}c.displayName="MDXCreateElement"},14166:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>o,contentTitle:()=>p,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>m});vara=r(87462),n=(r(67294),r(3905));consti={sidebar_label:"Page.metrics"},p="Page.metrics() method",l={unversionedId:"api/puppeteer.page.metrics",id:"version-17.1.2/api/puppeteer.page.metrics",title:"Page.metrics() method",description:"Signature:",source:"@site/versioned_docs/version-17.1.2/api/puppeteer.page.metrics.md",sourceDirName:"api",slug:"/api/puppeteer.page.metrics",permalink:"/api/puppeteer.page.metrics",draft:!1,tags:[],version:"17.1.2",frontMatter:{sidebar_label:"Page.metrics"},sidebar:"sidebar",previous:{title:"Page",permalink:"/api/puppeteer.page"},next:{title:"Page.mouse",permalink:"/api/puppeteer.page.mouse"}},o={},m=[{value:"Remarks",id:"remarks",level:2}],s={toc:m};functionu(e){let{components:t,...r}=e;return(0,n.kt)("wrapper",(0,a.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"pagemetrics-method"},"Page.metrics() method"),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Signature:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-typescript"},"class Page {\n metrics(): Promise<Metrics>;\n}\n")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Returns:")),(0,n.kt)("p",null,"Promise","<",(0,n.kt)("a",{parentName:"p",href:"/api/puppeteer.metrics"},"Metrics"),">"),(0,n.kt)("p",null,"Object containing metrics as key/value pairs."),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},(0,n.kt)("inlineCode",{parentName:"p"},"Timestamp")," : The timestamp when the metrics sample was taken.")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},(0,n.kt)("inlineCode",{parentName:"p"},"Documents")," : Number of documents in the page.")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("p",{parentName:"li"},(0,n.kt)("inlineCode",{parentName:"p"},"Frame