-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbench_map.h
43 lines (31 loc) · 934 Bytes
/
bench_map.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef SLOPE_BENCH_MAP_H_
#define SLOPE_BENCH_MAP_H_
#include <unistd.h>
#include <cstdint>
#include <memory>
#include <mutex>
#include <string>
#include <vector>
#include "allocator.h"
#include "logging.h"
#include "memcached_kv.h"
#include "mig.h"
#include "rdma_control.h"
#include "stat.h"
namespace slope {
namespace bench {
namespace map {
template <typename T>
using MigAlloc = slope::alloc::FixedPoolAllocator<T>;
template <typename T, typename T2>
using MigMap = std::map<T, T2, std::less<T>, MigAlloc<std::pair<const T, T2>>>;
using BInt = uint64_t;
using BMap = MigMap<BInt, BInt>;
const std::string map_size_param = "map_size";
void run(std::string self_id, std::vector<std::string> peers,
std::unique_ptr<slope::keyvalue::KeyValuePrefixMiddleware> kv,
std::map<std::string, std::string> params);
} // namespace map
} // namespace bench
} // namespace slope
#endif // SLOPE_BENCH_MAP_H_