mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
⚡ added hashing to benchmark
This commit is contained in:
parent
28dadac225
commit
c7e5b68144
1 changed files with 4 additions and 2 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <random>
|
#include <random>
|
||||||
|
#include "xxhash_str.h"
|
||||||
#include "bank.h"
|
#include "bank.h"
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
@ -67,8 +68,9 @@ int main(int argc, char **argv)
|
||||||
bank.AddUser("jolly", 0, "root");
|
bank.AddUser("jolly", 0, "root");
|
||||||
bank.admin_account = "twix";
|
bank.admin_account = "twix";
|
||||||
|
|
||||||
Op(std::hash<std::string>{}("twix is pog champ :flushed:"), "std::hash<std::string> ", 100000);
|
std::string data("twix is pog champ :flushed:");
|
||||||
Op(xxHashStringGen{}("twix is pog champ :flushed:", 27), "xxHashStringGen ", 100000);
|
Op(std::hash<std::string>{}(data), "std::hash<std::string> ", 100000);
|
||||||
|
Op(xxHashStringGen{}(data), "xxHashStringGen ", 100000);
|
||||||
|
|
||||||
Op_a(bank.AddUser("", 0, ""), "add user: ", 100000, bank.DelUser(""));
|
Op_a(bank.AddUser("", 0, ""), "add user: ", 100000, bank.DelUser(""));
|
||||||
Op(bank.ImpactBal("twix", 1), "impact bal: ", 100000);
|
Op(bank.ImpactBal("twix", 1), "impact bal: ", 100000);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue