Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
Practical-Cryptdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhaozhen
Practical-Cryptdb
Commits
a60fdd50
Commit
a60fdd50
authored
May 17, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add bench
parent
4e799185
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
7 deletions
+15
-7
bench_ashe.cc
test_crypto/bench_ashe.cc
+1
-7
bench_blowfish.cc
test_crypto/bench_blowfish.cc
+0
-0
bench_ope_int.cc
test_crypto/bench_ope_int.cc
+0
-0
bench_ope_str.cc
test_crypto/bench_ope_str.cc
+0
-0
bench_search.cc
test_crypto/bench_search.cc
+14
-0
No files found.
test_crypto/
test
_ashe.cc
→
test_crypto/
bench
_ashe.cc
View file @
a60fdd50
...
...
@@ -14,7 +14,6 @@
int
main
(
int
argc
,
char
**
argv
){
RAW_ASHE
ashe
(
1
);
int
num_of_tests
=
10000
;
if
(
argc
==
2
){
...
...
@@ -23,21 +22,16 @@ main(int argc,char**argv){
std
::
cout
<<
"num_of_tests"
<<
std
::
endl
;
return
0
;
}
unsigned
int
pt
=
1u
;
timer
t
;
std
::
pair
<
long
,
uint64_t
>
res
;
for
(
int
i
=
0
;
i
<
num_of_tests
;
i
++
)
{
res
=
ashe
.
encrypt
(
pt
,
0
);
}
std
::
cout
<<
"enc_ashe_in_us: "
<<
t
.
lap
()
*
1.0
/
num_of_tests
<<
std
::
endl
;
for
(
int
i
=
0
;
i
<
num_of_tests
;
i
++
)
{
ashe
.
decrypt
(
res
.
first
,
0
);
}
std
::
cout
<<
"dec_ashe_in_us: "
<<
t
.
lap
()
*
1.0
/
num_of_tests
<<
std
::
endl
;
return
0
;
}
test_crypto/
test
_blowfish.cc
→
test_crypto/
bench
_blowfish.cc
View file @
a60fdd50
File moved
test_crypto/
test
_ope_int.cc
→
test_crypto/
bench
_ope_int.cc
View file @
a60fdd50
File moved
test_crypto/
test
_ope_str.cc
→
test_crypto/
bench
_ope_str.cc
View file @
a60fdd50
File moved
test_crypto/bench_search.cc
0 → 100644
View file @
a60fdd50
#include <vector>
#include "util/errstream.hh"
#include "crypto/search.hh"
static
void
test_search
(
int
num_of_tests
,
int
len
){
search_priv
s
(
"my key"
);
std
::
string
input
=
std
::
string
(
len
,
'a'
);
auto
cl
=
s
.
transform
({
"hexxxxxxxxxxxxxxxxxxxllo"
,
"world"
,
input
});
std
::
cout
<<
cl
.
size
()
<<
std
::
endl
;
}
int
main
(){
test_search
(
10
,
8
);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment