PageSourceSearch

https://mojolang.org/assets/js/d63f43bf.5ade8273.js

js mojolang.org collected 2026-10-01 12:00:31 UTC 5,881 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmodular_fe=self.webpackChunkmodular_fe||[]).push([["14741"],{45556(e,n,s){s.r(n),s.d(n,{metadata:()=>r,default:()=>h,frontMatter:()=>c,contentTitle:()=>o,toc:()=>l,assets:()=>d});var r=JSON.parse('{"id":"docs/std/benchmark/bencher/BenchmarkInfo","title":"BenchmarkInfo","description":"Defines a Benchmark Info struct to record execution Statistics.","source":"@site/versioned_docs/version-1.1.0/docs/std/benchmark/bencher/BenchmarkInfo.md","sourceDirName":"docs/std/benchmark/bencher","slug":"/docs/std/benchmark/bencher/BenchmarkInfo","permalink":"/docs/std/benchmark/bencher/BenchmarkInfo","draft":false,"unlisted":false,"editUrl":"https://github.com/modular/modular/edit/main/Mojo/docs/site/std/benchmark/bencher/BenchmarkInfo.md","tags":[],"version":"1.1.0","frontMatter":{"title":"BenchmarkInfo","version":"1.1.0.dev0","slug":"BenchmarkInfo","type":"struct","namespace":"std.benchmark.bencher","lang":"mojo","show_stability_marker":null,"description":"Defines a Benchmark Info struct to record execution Statistics."},"sidebar":"stdSidebar","previous":{"title":"Bencher","permalink":"/docs/std/benchmark/bencher/Bencher"},"next":{"title":"Format","permalink":"/docs/std/benchmark/bencher/Format"}}'),t=s(74848),i=s(28453);let c={title:"BenchmarkInfo",version:"1.1.0.dev0",slug:"BenchmarkInfo",type:"struct",namespace:"std.benchmark.bencher",lang:"mojo",show_stability_marker:null,description:"Defines a Benchmark Info struct to record execution Statistics."},o,d={},l=[{value:"Fields",id:"fields",level:2},{value:"Implemented traits",id:"implemented-traits",level:2},{value:"Methods",id:"methods",level:2},{value:"<code>__init__</code>",id:"__init__",level:3}];function a(e){let n={a:"a",b:"b",code:"code",div:"div",h2:"h2",h3:"h3",li:"li",p:"p",section:"section",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(n.section,{className:"mojo-docs",children:["\n",(0,t.jsxs)(n.div,{className:"mojo-function-sig",children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"struct BenchmarkInfo"})}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Defines a Benchmark Info struct to record execution Statistics."}),"\n",(0,t.jsx)(n.h2,{id:"fields",children:"Fields"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\u200B",(0,t.jsx)(n.b,{children:"name"})," (",(0,t.jsx)(n.code,{children:"String"}),"): The name of the benchmark."]}),"\n",(0,t.jsxs)(n.li,{children:["\u200B",(0,t.jsx)(n.b,{children:"result"})," (",(0,t.jsx)(n.code,{children:"Report"}),"): The output report after executing a benchmark."]}),"\n",(0,t.jsxs)(n.li,{children:["\u200B",(0,t.jsx)(n.b,{children:"measures"})," (",(0,t.jsx)(n.code,{children:"List[ThroughputMeasure]"}),"): Optional arg used to represent a list of ThroughputMeasure's."]}),"\n",(0,t.jsxs)(n.li,{children:["\u200B",(0,t.jsx)(n.b,{children:"verbose_timing"})," (",(0,t.jsx)(n.code,{children:"Bool"}),"): Whether to print verbose timing results."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"implemented-traits",children:"Implemented traits"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"../../../../../docs/std/traits/anytype/AnyType",children:(0,t.jsx)(n.code,{children:"AnyType"})}),",\n",(0,t.jsx)(n.a,{href:"../../../../../docs/std/traits/copyable/Copyable",children:(0,t.jsx)(n.code,{children:"Copyable"})}),",\n",(0,t.jsx)(n.a,{href:"../../../../../docs/std/traits/deinitable/Deinitable",children:(0,t.jsx)(n.code,{children:"Deinitable"})}),",\n",(0,t.jsx)(n.a,{href:"../../../../../docs/std/traits/movable/Movable",children:(0,t.jsx)(n.code,{children:"Movable"})})]}),"\n",(0,t.jsx)(n.h2,{id:"methods",children:"Methods"}),"\n",(0,t.jsx)(n.h3,{id:"__init__",children:(0,t.jsx)(n.code,{children:"__init__"})}),"\n",(0,t.jsxs)(n.div,{className:"mojo-function-detail",children:["\n",(0,t.jsxs)(n.div,{className:"mojo-function-sig",children:["\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"def __init__(out self, name: String, var result: Report, var measures: List[ThroughputMeasure] = List(), verbose_timing: Bool = False)"})}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Constructs a ",(0,t.jsx)(n.code,{children:"BenchmarkInfo"})," object to return benchmark report and statistics."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Args:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\u200B",(0,t.jsx)(n.b,{children:"name"})," (",(0,t.jsx)(n.a,{href:"../../../../../docs/std/collections/string/string/String",children:(0,t.jsx)(n.code,{children:"String"})}),"): The name of the benchmark."]}),"\n",(0,t.jsxs)(n.li,{children:["\u200B",(0,t.jsx)(n.b,{children:"result"})," (",(0,t.jsx)(n.a,{href:"../../../../../docs/std/benchmark/benchmark/Report",children:(0,t.jsx)(n.code,{children:"Report"})}),"): The output report after executing a benchmark."]}),"\n",(0,t.jsxs)(n.li,{children:["\u200B",(0,t.jsx)(n.b,{children:"measures"})," (",(0,t.jsx)(n.a,{href:"../../../../../docs/std/collections/list/List",children:(0,t.jsx)(n.code,{children:"List[ThroughputMeasure]"})}),"): Optional arg used to represent a list of ThroughputMeasure's."]}),"\n",(0,t.jsxs)(n.li,{children:["\u200B",(0,t.jsx)(n.b,{children:"verbose_timing"})," (",(0,t.jsx)(n.a,{href:"../../../../../docs/std/builtin/bool/Bool",children:(0,t.jsx)(n.code,{children:"Bool"})}),"): Whether to print verbose timing results."]}),"\n"]}),"\n"]}),"\n"]})}function h(e={}){let{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},28453(e,n,s){s.d(n,{R:()=>c,x:()=>o});var r=s(96540);let t={},i=r.createContext(t);function c(e){let n=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.