Instrumentor
- 'Instrumentor' now creates a directory for the specified session path - Added <filesystem> to <ltpch>
This commit is contained in:
parent
dff6bec35c
commit
590c319d4d
3 changed files with 14 additions and 9 deletions
|
@ -20,6 +20,8 @@ namespace Light {
|
|||
|
||||
void Instrumentor::BeginSessionImpl(const std::string& outputPath)
|
||||
{
|
||||
std::filesystem::create_directory(outputPath.substr(0, outputPath.find_last_of('/') + 1));
|
||||
|
||||
m_OutputFileStream.open(outputPath);
|
||||
m_OutputFileStream << "{\"traceEvents\":[";
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Light {
|
|||
};
|
||||
|
||||
// #todo: add event categories
|
||||
// #todo: use ofstream in a seperate thread
|
||||
// #todo: use ofstream in a separate thread
|
||||
class Instrumentor
|
||||
{
|
||||
private:
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
// ENGINE //
|
||||
//** ENGINE **//
|
||||
#include "Base.h"
|
||||
|
||||
// PLATFORM SPECIFIC //
|
||||
//** PLATFORM SPECIFIC **//
|
||||
// windows
|
||||
#ifdef _WIN32
|
||||
#define NOMINMAX
|
||||
|
@ -11,7 +11,7 @@
|
|||
#undef NOMINMAX
|
||||
#endif
|
||||
|
||||
// CONTAINERS //
|
||||
//** CONTAINERS **//
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
|
@ -21,26 +21,29 @@
|
|||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
// MISCELLANEOUS //
|
||||
//** MISCELLANEOUS **//
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
// INPUT_OUTPUT //
|
||||
//** INPUT_OUTPUT **//
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
// MULTI_THREADING //
|
||||
//** MULTI_THREADING **//
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
|
||||
// STRING //
|
||||
//** STRING **//
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
// C_LIBRARIES //
|
||||
//** FILESYSTEM **//
|
||||
#include <filesystem>
|
||||
|
||||
//** C_LIBRARIES **//
|
||||
#include <time.h>
|
||||
#include <math.h>
|
Loading…
Add table
Reference in a new issue