MCPcopy Create free account
hub / github.com/babel/minify / print

Method print

scripts/benchmark.js:170–213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168 ];
169 }
170 print() {
171 switch (this.target) {
172 case "TERM":
173 const tableProps = {
174 head: this.header,
175 chars: {
176 top: "",
177 "top-left": "",
178 "top-mid": "",
179 "top-right": "",
180 left: "",
181 "left-mid": "",
182 mid: "",
183 "mid-mid": "",
184 right: "",
185 "right-mid": "",
186 bottom: "",
187 "bottom-left": "",
188 "bottom-mid": "",
189 "bottom-right": "",
190 middle: " | "
191 },
192 style: {
193 "padding-left": 0,
194 "padding-right": 0,
195 head: ["bold"]
196 }
197 };
198 const clitable = new CLITable(tableProps);
199 const rows = this.getRows(this.result);
200 clitable.push(...rows);
201
202 this.printHead(this.result);
203 console.log(clitable.toString());
204
205 break;
206 case "MD":
207 const mdtable = [this.header, ...this.getRows(this.result)];
208 this.printHead(this.result);
209 console.log(MDTable(mdtable));
210
211 break;
212 }
213 }
214 printHead(data) {
215 console.log(`\nBenchmark Results for ${path.basename(data.filename)}:`);
216 this.target === "MD" && console.log("");

Callers 2

runAndPrintMethod · 0.95
runFunction · 0.80

Calls 4

getRowsMethod · 0.95
printHeadMethod · 0.95
pushMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected