Files
spark/src/lib/orderman/orderman_utils/PerfTraceLog.h
T

35 lines
739 B
C++

#pragma once
#include <memory>
#include <vector>
#include <map>
namespace bts {
class PerfTrace;
class PerfTraceLog {
public:
PerfTraceLog();
~PerfTraceLog();
void log(const PerfTrace &);
// returns number of persisted traces
int persist_traces();
// return the N last traces
std::vector<std::map<std::string, std::string>> get_latest_requote_traces(size_t n=0);
std::vector<std::map<std::string, std::string>> get_latest_hedge_traces(size_t n=0);
void print_latest_traces(std::ostream &,size_t n = 0);
private:
struct PImpl;
std::unique_ptr<PImpl> me;
std::string init_storage_location();
bool schema_out_of_date();
void store(std::vector<PerfTrace> const &);
};
} // namespace bts