MCPcopy Create free account
hub / github.com/firebase/firebase-tools / outputText

Method outputText

src/profileReport.ts:589–622  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

587 }
588
589 outputText() {
590 const totalTime = this.state.endTime - this.state.startTime;
591 const isFile = this.options.isFile;
592 const write = this.write.bind(this);
593 const writeTitle = (title: string) => {
594 if (isFile) {
595 write(title + "\n");
596 } else {
597 write(clc.bold(clc.yellow(title)) + "\n");
598 }
599 };
600 const writeTable = (title: string, table: Table.Table) => {
601 writeTitle(title);
602 write(table.toString() + "\n");
603 };
604 writeTitle(
605 `Report operations collected from ${new Date(
606 this.state.startTime,
607 ).toISOString()} over ${totalTime} ms.`,
608 );
609 writeTitle("Speed Report\n");
610 write(SPEED_NOTE + "\n\n");
611 writeTable("Read Speed", this.renderReadSpeed());
612 writeTable("Write Speed", this.renderWriteSpeed());
613 writeTable("Broadcast Speed", this.renderBroadcastSpeed());
614 writeTable("Connect Speed", this.renderConnectSpeed());
615 writeTable("Disconnect Speed", this.renderDisconnectSpeed());
616 writeTable("Unlisten Speed", this.renderUnlistenSpeed());
617 writeTitle("Bandwidth Report\n");
618 write(BANDWIDTH_NOTE + "\n\n");
619 writeTable("Downloaded Bytes", this.renderOutgoingBandwidth());
620 writeTable("Uploaded Bytes", this.renderIncomingBandwidth());
621 writeTable("Unindexed Queries", this.renderUnindexedData());
622 }
623
624 generateJson() {
625 return this.parse(this.processOperation.bind(this), this.outputJson.bind(this));

Callers

nothing calls this directly

Calls 10

renderReadSpeedMethod · 0.95
renderWriteSpeedMethod · 0.95
renderBroadcastSpeedMethod · 0.95
renderConnectSpeedMethod · 0.95
renderDisconnectSpeedMethod · 0.95
renderUnlistenSpeedMethod · 0.95
renderUnindexedDataMethod · 0.95
writeFunction · 0.85

Tested by

no test coverage detected