From 9d60b64fe684b18af5323c2b52cb26c04883db72 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Thu, 5 Jan 2023 14:03:38 +0100 Subject: Adjust to new API --- plugins/statistics/statistics.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/statistics') diff --git a/plugins/statistics/statistics.cpp b/plugins/statistics/statistics.cpp index 959fd33..8932527 100644 --- a/plugins/statistics/statistics.cpp +++ b/plugins/statistics/statistics.cpp @@ -38,14 +38,14 @@ namespace { std::string statistics{GetServerParam("statistics")}; Tempfile tempStats{".txt"}; // input data - File::setFile(tempStats.GetPath(), statistics); + File::setFile(tempStats.getPath(), statistics); Tempfile tempPng{".png"}; // output Tempfile tempGnuplot{".gnuplot"}; std::stringstream s; s << "set terminal png truecolor\n"; - s << "set output " << tempPng.GetPath() << "\n"; // quotes added automatically for paths + s << "set output " << tempPng.getPath() << "\n"; // quotes added automatically for paths s << "set title \"Webserver Throughput\"\n"; s << "set xlabel \"Time\"\n"; s << "set timefmt \"%s\"\n"; @@ -56,17 +56,17 @@ namespace { s << "set datafile separator \",\"\n"; s << "set grid\n"; s << "set style fill solid\n"; - s << "plot " << tempStats.GetPath() << " using 1:($4+$5) with boxes title \"Bytes I/O\" lt rgb \"#1132A7\"\n"; - File::setFile(tempGnuplot.GetPath(), s.str()); + s << "plot " << tempStats.getPath() << " using 1:($4+$5) with boxes title \"Bytes I/O\" lt rgb \"#1132A7\"\n"; + File::setFile(tempGnuplot.getPath(), s.str()); - int exit_code{system(("gnuplot "s + tempGnuplot.GetPath().generic_string()).c_str())}; + int exit_code{system(("gnuplot "s + tempGnuplot.getPath().generic_string()).c_str())}; if (exit_code) { std::cerr << "Error: gnuplot returned " << std::to_string(exit_code) << std::endl; return HttpStatus("500", "Statistics error"s, SetResponseHeader); } SetResponseHeader("content_type", "image/png"); - return File::getFile(tempPng.GetPath()); + return File::getFile(tempPng.getPath()); } // returns sum over specified column -- cgit v1.2.3