-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpbe1.cpp
More file actions
31 lines (28 loc) · 816 Bytes
/
pbe1.cpp
File metadata and controls
31 lines (28 loc) · 816 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
29
30
#include "../src/util.h"
#include "../src/staircase.h"
#include <iostream>
#include <fstream>
#include <ctime>
using namespace std;
int main() {
ofstream val("pbe1_swimming_val");
ofstream st("pbe1_swimming_st");
for (int i = 2; i < 73; ++i) {
Staircase s;
s.set_param({i, 1500});
ifstream f("../data/swimming.dat");
auto start = clock();
while (f) {
ull x, y, z;
f >> x >> y >> z;
s.feed({x, (double)z});
}
auto duration = (clock() - start) / (double)CLOCKS_PER_SEC;
for (int ts = 0; ts < 50000; ts += 1440) {
val << i << " " << ts;
val << " " << s.burstiness(ts, 1440);
val << endl;
}
st << i << " " << s.memory_usage() << " " << duration << endl;
}
}