Browse Source

Integrated LevelDB backend into tracer, streamlined name handling in

backends
pull/3/head
Eyck Jentzsch 1 year ago
parent
commit
53ff55301c
3 changed files with 6 additions and 2 deletions
  1. 1
    1
      incl/scc/tracer.h
  2. 0
    1
      src/scv_tr_sqlite/scv_tr_sqlite.cpp
  3. 5
    0
      src/tracer.cpp

+ 1
- 1
incl/scc/tracer.h View File

@@ -42,7 +42,7 @@ public:
/**
*
*/
enum file_type { NONE, TEXT, COMPRESSED, BINARY, SQLITE };
enum file_type { NONE, TEXT, COMPRESSED, BINARY, SQLITE, LEVEL };
/**
*
* @param name basename of the trace file(s)

+ 0
- 1
src/scv_tr_sqlite/scv_tr_sqlite.cpp View File

@@ -137,7 +137,6 @@ static void dbCb(const scv_tr_db &_scv_tr_db, scv_tr_db::callback_reason reason,
case scv_tr_db::CREATE:
if ((_scv_tr_db.get_name() != nullptr) && (strlen(_scv_tr_db.get_name()) != 0)) fName = _scv_tr_db.get_name();
try {
if (fName.size() < 5 || fName.find(".txdb", fName.size() - 5) == string::npos) fName += ".txdb";
remove(fName.c_str());
db.open(fName);
// performance related according to

+ 5
- 0
src/tracer.cpp View File

@@ -64,6 +64,11 @@ tracer::tracer(const std::string &&name, file_type type, bool enable)
break;
case SQLITE:
scv_tr_sqlite_init();
ss << ".txdb";
break;
case LEVEL:
scv_tr_ldb_init();
ss << ".txldb";
break;
}
txdb = new scv_tr_db(ss.str().c_str());

Loading…
Cancel
Save