forked from shangqi-lai/SDd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
28 lines (22 loc) · 823 Bytes
/
main.cpp
File metadata and controls
28 lines (22 loc) · 823 Bytes
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
#include <iostream>
#include <chrono>
#include "SSEClient.h"
using namespace chrono;
int main() {
SSEClient client(10000);
// cout << duration_cast<microseconds>(system_clock::now().time_since_epoch()).count() << endl;
for (int i = 0; i < 10000; ++i) {
client.update(INS, "test", i);
}
// cout << duration_cast<microseconds>(system_clock::now().time_since_epoch()).count() << endl;
for (int i = 0; i < 100; ++i) {
client.update(DEL, "test", i);
}
// cout << duration_cast<microseconds>(system_clock::now().time_since_epoch()).count() << endl;
vector<int> results = client.search("test");
// cout << duration_cast<microseconds>(system_clock::now().time_since_epoch()).count() << endl;
for (int res : results) {
cout << res << endl;
}
return 0;
}