Skip to content

Commit

Permalink
Add: Snapshot creation boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
s-bose7 committed Jun 21, 2024
1 parent 843e8fb commit 6ab3587
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_snapshot.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <gtest/gtest.h>

#include "../utils/snapshot.h"
#include "../include/memcache.h"


const string snapshotFile = "backup/test_snapshot.bin";

TEST(TestSnapshot, SnapShotCreation){

}

TEST(TestSnapshot, SnapShotLoading){

}

int snapshot_creation_main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
Empty file removed utils/snapshot.cc
Empty file.
20 changes: 20 additions & 0 deletions utils/snapshot.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef SNAPSHOT_H
#define SNAPSHOT_H

#include <fstream>
#include <filesystem>

#include "../include/memcache.h"

template<typename K, typename V>
bool create_binary_snapshot(const MemCache<K, V>& memcache, const string& snapshotFile){

}


template<typename K, typename V>
bool load_binary_snapshot(MemCache<K, V>& memcache, const string& snapshotFile) {

}

#endif

0 comments on commit 6ab3587

Please sign in to comment.