Skip to content

Commit

Permalink
style update
Browse files Browse the repository at this point in the history
  • Loading branch information
martinus committed Nov 3, 2019
1 parent e455004 commit a1d1298
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ int main() {
Runs for ~3ms to print

```markdown
| ns/op | op/s | error % | ins/op | cyc/op | IPC | branch/op | missed% | total sec | benchmark
|------------------:|--------------------:|--------:|----------------:|----------------:|-------:|---------------:|--------:|----------:|:----------------------------------------------
| 8.75 | 114,278,296.99 | 0.8% | 8.31 | 27.98 | 0.297 | 1.00 | 8.9% | 0.00 | some double ops
| ns/op | op/s | err% | ins/op | cyc/op | IPC | bra/op | mis% | total | benchmark
|--------------------:|--------------------:|--------:|----------------:|----------------:|-------:|---------------:|--------:|----------:|:----------------------------------------------
| 8.74 | 114,422,483.01 | 0.6% | 8.32 | 27.88 | 0.298 | 1.00 | 8.6% | 0.00 | some double ops
```

Which github renders as

| ns/op | op/s | error % | ins/op | cyc/op | IPC | branch/op | missed% | total sec | benchmark
|------------------:|--------------------:|--------:|----------------:|----------------:|-------:|---------------:|--------:|----------:|:----------------------------------------------
| 8.75 | 114,278,296.99 | 0.8% | 8.31 | 27.98 | 0.297 | 1.00 | 8.9% | 0.00 | some double ops
| ns/op | op/s | err% | ins/op | cyc/op | IPC | bra/op | mis% | total | benchmark
|--------------------:|--------------------:|--------:|----------------:|----------------:|-------:|---------------:|--------:|----------:|:----------------------------------------------
| 8.74 | 114,422,483.01 | 0.6% | 8.32 | 27.88 | 0.298 | 1.00 | 8.6% | 0.00 | some double ops

# Design Goals

Expand Down
8 changes: 4 additions & 4 deletions src/include/nanobench.h
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ Result IterationLogic::showResult(std::string const& errorMessage) const {
os << "| relative ";
}
os << "|" << std::setw(20) << std::right << ("ns/" + mConfig.unit()) << " |" << std::setw(20) << std::right
<< (mConfig.unit() + "/s") << " | error %";
<< (mConfig.unit() + "/s") << " | err%";

if (showPc) {
if (r.hasMedianInstructionsPerUnit()) {
Expand All @@ -1084,14 +1084,14 @@ Result IterationLogic::showResult(std::string const& errorMessage) const {
os << " |" << std::setw(7) << std::right << "IPC";
}
if (r.hasMedianBranchesPerUnit()) {
os << " |" << std::setw(15) << std::right << ("branch/" + mConfig.unit());
os << " |" << std::setw(15) << std::right << ("bra/" + mConfig.unit());
}
if (r.hasMedianBranchesPerUnit() && r.hasMedianBranchMissesPerUnit()) {
os << " |" << std::setw(8) << std::right << "miss %";
os << " |" << std::setw(8) << std::right << "mis%";
}
}

os << " |" << std::setw(10) << std::right << "total sec";
os << " |" << std::setw(10) << std::right << "total";
os << " | " << mConfig.title() << std::endl;

if (mConfig.relative()) {
Expand Down

0 comments on commit a1d1298

Please sign in to comment.