From d1e66718b5f44ce608b33356d8c4a91062baa25e Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sun, 31 Jul 2016 13:56:57 -0400 Subject: [PATCH] loolstress: TraceFile -> TraceFileWriter Change-Id: Icf22189170cfb57f014346c91ba99a9cae5fe18a Reviewed-on: https://gerrit.libreoffice.org/27958 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian --- loolwsd/LOOLWSD.cpp | 4 ++-- loolwsd/LOOLWSD.hpp | 2 +- loolwsd/TraceFile.hpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index cb0cb1977..c2df0b39c 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -1265,7 +1265,7 @@ static std::string UnitTestLibrary; unsigned int LOOLWSD::NumPreSpawnedChildren = 0; std::atomic LOOLWSD::NumDocBrokers; std::atomic LOOLWSD::NumConnections; -std::unique_ptr LOOLWSD::TraceDumper; +std::unique_ptr LOOLWSD::TraceDumper; class AppConfigMap : public Poco::Util::MapConfiguration { @@ -1398,7 +1398,7 @@ void LOOLWSD::initialize(Application& self) if (getConfigValue(conf, "trace[@enable]", false)) { const auto& path = getConfigValue(conf, "trace.path", ""); - TraceDumper.reset(new TraceFile(path)); + TraceDumper.reset(new TraceFileWriter(path)); Log::info("Command trace dumping enabled to file: " + path); } diff --git a/loolwsd/LOOLWSD.hpp b/loolwsd/LOOLWSD.hpp index 72f3ffedb..5d1417112 100644 --- a/loolwsd/LOOLWSD.hpp +++ b/loolwsd/LOOLWSD.hpp @@ -47,7 +47,7 @@ public: static std::string LOKitVersion; static std::atomic NumDocBrokers; static std::atomic NumConnections; - static std::unique_ptr TraceDumper; + static std::unique_ptr TraceDumper; static std::string GenSessionId() diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp index 476b409b0..8c61d1f4e 100644 --- a/loolwsd/TraceFile.hpp +++ b/loolwsd/TraceFile.hpp @@ -11,16 +11,16 @@ #include /// Dumps commands and notification trace. -class TraceFile +class TraceFileWriter { public: - TraceFile(const std::string& path) : + TraceFileWriter(const std::string& path) : _epochStart(Poco::Timestamp().epochMicroseconds()), _stream(path, std::ios::out) { } - ~TraceFile() + ~TraceFileWriter() { _stream.close(); }