Skip to content

Commit

Permalink
XrdApps:JCache: fix Art print class
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Joachim Peters committed Jun 10, 2024
1 parent 3e521ce commit 7cd6ddb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/XrdApps/XrdClJCachePlugin/file/Art.hh
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,17 @@ public:
// Print the plot with Y legend
for (int i = 0; i < plotHeight; ++i) {
double yValue = minValue + (maxValue - minValue) * (plotHeight - 1 - i) / (plotHeight - 1);
std::cout << std::setw(yLegendWidth) << std::fixed << std::setprecision(2) << yValue << " MB/s | ";
if (i==0) {
std::cout << std::setw(yLegendWidth) << std::fixed << std::setprecision(2) << yValue << " MB/s | ";
} else {
std::cout << std::setw(yLegendWidth) << std::fixed << std::setprecision(2) << yValue << " | ";
}
std::cout << plot[i] << std::endl;
}

// Print the X axis
std::cout << std::string(yLegendWidth + 7, ' ') << std::string(plotWidth, '-') << std::endl;
std::cout << std::string(yLegendWidth + 7, ' ') << "0 1 2 3 4 5 6 7 8 9" << std::endl;
std::cout << std::string(yLegendWidth + 7, ' ') << " 0 1 2 3 4 5 6 7 8 9" << std::endl;
}

void drawCurve(const std::vector<long unsigned int>& data, double interval) {
Expand Down

0 comments on commit 7cd6ddb

Please sign in to comment.