diff --git a/src/XrdApps/XrdClJCachePlugin/file/Art.hh b/src/XrdApps/XrdClJCachePlugin/file/Art.hh index 4dcb31d2448..f44e0373140 100644 --- a/src/XrdApps/XrdClJCachePlugin/file/Art.hh +++ b/src/XrdApps/XrdClJCachePlugin/file/Art.hh @@ -37,7 +37,7 @@ public: Art() {} virtual ~Art() {} - void drawCurve(const std::vector& dataPoints) { + void drawCurve(const std::vector& dataPoints, double runtime) { if (dataPoints.size() != 10) { std::cerr << "Error: Exactly 10 data points are required." << std::endl; return; @@ -78,15 +78,15 @@ public: // 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 [ 10 :=" << std::fixed << std::setprecision(2) << runtime << "s ]"<< std::endl; } - void drawCurve(const std::vector& data, double interval) { + void drawCurve(const std::vector& data, double interval, double runtime) { std::vector newdata; for ( auto i:data ) { newdata.push_back(i/1000000.0 / interval); } - return drawCurve(newdata); + return drawCurve(newdata, runtime); } }; diff --git a/src/XrdApps/XrdClJCachePlugin/file/XrdClJCacheFile.hh b/src/XrdApps/XrdClJCachePlugin/file/XrdClJCacheFile.hh index 5ea2d2038f3..beaafd10891 100644 --- a/src/XrdApps/XrdClJCachePlugin/file/XrdClJCacheFile.hh +++ b/src/XrdApps/XrdClJCachePlugin/file/XrdClJCacheFile.hh @@ -349,7 +349,7 @@ public: using namespace std::chrono; std::vector bins = sStats.bench.GetBins(); Art art; - art.drawCurve(bins, sStats.bench.GetTimePerBin().count() / 1000000.0); + art.drawCurve(bins, sStats.bench.GetTimePerBin().count() / 1000000.0, realTime); } }