loolstress: TraceFile -> TraceFileWriter

Change-Id: Icf22189170cfb57f014346c91ba99a9cae5fe18a
Reviewed-on: https://gerrit.libreoffice.org/27958
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian 2016-07-31 13:56:57 -04:00 committed by Ashod Nakashian
parent a7c1a17f98
commit d1e66718b5
3 changed files with 6 additions and 6 deletions

View file

@ -1265,7 +1265,7 @@ static std::string UnitTestLibrary;
unsigned int LOOLWSD::NumPreSpawnedChildren = 0;
std::atomic<unsigned> LOOLWSD::NumDocBrokers;
std::atomic<unsigned> LOOLWSD::NumConnections;
std::unique_ptr<TraceFile> LOOLWSD::TraceDumper;
std::unique_ptr<TraceFileWriter> LOOLWSD::TraceDumper;
class AppConfigMap : public Poco::Util::MapConfiguration
{
@ -1398,7 +1398,7 @@ void LOOLWSD::initialize(Application& self)
if (getConfigValue<bool>(conf, "trace[@enable]", false))
{
const auto& path = getConfigValue<std::string>(conf, "trace.path", "");
TraceDumper.reset(new TraceFile(path));
TraceDumper.reset(new TraceFileWriter(path));
Log::info("Command trace dumping enabled to file: " + path);
}

View file

@ -47,7 +47,7 @@ public:
static std::string LOKitVersion;
static std::atomic<unsigned> NumDocBrokers;
static std::atomic<unsigned> NumConnections;
static std::unique_ptr<TraceFile> TraceDumper;
static std::unique_ptr<TraceFileWriter> TraceDumper;
static
std::string GenSessionId()

View file

@ -11,16 +11,16 @@
#include <fstream>
/// 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();
}