mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🔥 removed legacy benchmarking macros
This commit is contained in:
parent
7be15963d0
commit
31f8a67dfb
1 changed files with 1 additions and 42 deletions
|
|
@ -3,47 +3,6 @@
|
|||
template <bool set_body_flag, bool require_admin>
|
||||
UserFilter<set_body_flag, require_admin>::UserFilter(Bank &b) : bank(b) {}
|
||||
|
||||
#define time_func_a(f, a, x) \
|
||||
{ \
|
||||
using namespace std::chrono; \
|
||||
uint32_t timer = 0; \
|
||||
for (int i = 0; i < x; ++i) \
|
||||
{ \
|
||||
auto t1 = high_resolution_clock::now().time_since_epoch(); \
|
||||
f; \
|
||||
auto t2 = high_resolution_clock::now().time_since_epoch(); \
|
||||
a; \
|
||||
timer += std::chrono::duration_cast<std::chrono::nanoseconds>((t2 - t1)).count(); \
|
||||
} \
|
||||
std::cout << timer / x << '\n'; \
|
||||
}
|
||||
|
||||
#define time_func(f, x) \
|
||||
{ \
|
||||
using namespace std::chrono; \
|
||||
uint32_t timer = 0; \
|
||||
for (int i = 0; i < x; ++i) \
|
||||
{ \
|
||||
auto t1 = high_resolution_clock::now().time_since_epoch(); \
|
||||
f; \
|
||||
auto t2 = high_resolution_clock::now().time_since_epoch(); \
|
||||
timer += std::chrono::duration_cast<std::chrono::nanoseconds>((t2 - t1)).count(); \
|
||||
} \
|
||||
std::cout << timer / x << '\n'; \
|
||||
}
|
||||
|
||||
#define Op_a(v, name, x, a) \
|
||||
{ \
|
||||
std::cout << name; \
|
||||
time_func_a(v, a, x); \
|
||||
}
|
||||
|
||||
#define Op(v, name, x) \
|
||||
{ \
|
||||
std::cout << name; \
|
||||
time_func(v, x); \
|
||||
}
|
||||
|
||||
template <bool set_body_flag, bool require_admin>
|
||||
void UserFilter<set_body_flag, require_admin>::doFilter(const HttpRequestPtr &req,
|
||||
FilterCallback &&fcb,
|
||||
|
|
@ -100,4 +59,4 @@ void UserFilter<set_body_flag, require_admin>::doFilter(const HttpRequestPtr &re
|
|||
|
||||
template class UserFilter<true, false>; //user default
|
||||
template class UserFilter<false, false>; //user sparse
|
||||
template class UserFilter<false, true>; //admin
|
||||
template class UserFilter<false, true>; //admin
|
||||
|
|
|
|||
Loading…
Reference in a new issue