diff --git a/src/XrdApps/XrdClJCachePlugin/file/Art.hh b/src/XrdApps/XrdClJCachePlugin/file/Art.hh index eeaf7f072b6..266665e8117 100644 --- a/src/XrdApps/XrdClJCachePlugin/file/Art.hh +++ b/src/XrdApps/XrdClJCachePlugin/file/Art.hh @@ -68,13 +68,13 @@ 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 << " | "; + std::cout << std::setw(yLegendWidth) << std::fixed << std::setprecision(2) << yValue << " MB/s | "; std::cout << plot[i] << std::endl; } // Print the X axis - std::cout << std::string(yLegendWidth + 3, ' ') << std::string(plotWidth, '-') << std::endl; - std::cout << std::string(yLegendWidth + 3, ' ') << "0 1 2 3 4 5 6 7 8 9" << std::endl; + 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; } void drawCurve(const std::vector& data, double interval) { diff --git a/src/XrdApps/XrdClJCachePlugin/file/XrdClJCacheFile.hh b/src/XrdApps/XrdClJCachePlugin/file/XrdClJCacheFile.hh index 2581e3d3340..5ea2d2038f3 100644 --- a/src/XrdApps/XrdClJCachePlugin/file/XrdClJCacheFile.hh +++ b/src/XrdApps/XrdClJCachePlugin/file/XrdClJCacheFile.hh @@ -322,15 +322,6 @@ public: oss << "# JCache : app readrate : " << std::fixed << std::setprecision(2) << sStats.bytesToHumanReadable((sStats.ReadBytes()/sStats.realTime)) << "/s" << std::endl; oss << "# ----------------------------------------------------------- #" << std::endl; - using namespace std::chrono; - - std::vector bins = sStats.bench.GetBins(); - - for (size_t i = 0; i < bins.size(); ++i) { - std::cout << "Bin " << i + 1 << ": " << bins[i] << " bytes" << std::endl; - } - Art art; - art.drawCurve(bins, sStats.bench.GetTimePerBin().count() / 1000000.0); return oss.str(); } //! structure about cache hit statistics @@ -355,6 +346,10 @@ public: ~CacheStats() { if (dumponexit.load()) { std::cerr << GlobalStats(); + using namespace std::chrono; + std::vector bins = sStats.bench.GetBins(); + Art art; + art.drawCurve(bins, sStats.bench.GetTimePerBin().count() / 1000000.0); } }