Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide conditioning on input to table creation for report #797

Merged
merged 1 commit into from
Apr 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions packages/caliper-core/lib/master/report/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,17 @@ class Report {

/**
* print table
* @param {Map | Map[]} tableArray a table array containing performance information compatible with the npm table module
* @param {string[]} tableArray a table array containing performance information compatible with the npm table module
*/
printTable(tableArray) {
// tableArray[0] = array of column titles
// tableArray[1+] = array column values
let t = table.table(tableArray, {border: table.getBorderCharacters('ramac')});
Logger.info('\n' + t);
if (tableArray.length > 0) {
let t = table.table(tableArray, {border: table.getBorderCharacters('ramac')});
Logger.info('\n' + t);
} else {
Logger.error('No data within test result; implies error within configuration files');
}
}

/**
Expand Down