Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
fd774a65
Commit
fd774a65
authored
Sep 13, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
851864a9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
5 deletions
+29
-5
go/neo/t/.gitignore
go/neo/t/.gitignore
+1
-0
go/neo/t/t.sh
go/neo/t/t.sh
+26
-3
go/neo/t/zhash.go
go/neo/t/zhash.go
+1
-1
go/neo/t/zhash.py
go/neo/t/zhash.py
+1
-1
No files found.
go/neo/t/.gitignore
View file @
fd774a65
/log
/log
/var
/var
/zhash
/zhash
/zhash_go
go/neo/t/t.sh
View file @
fd774a65
...
@@ -77,7 +77,7 @@ Sgo() {
...
@@ -77,7 +77,7 @@ Sgo() {
# -cpuprofile cpu.out
# -cpuprofile cpu.out
# -trace trace.out
# -trace trace.out
exec
-a
Sgo
\
exec
-a
Sgo
\
neo
-
cpuprofile
cpu.out
-
log_dir
=
$log
storage
-cluster
=
$cluster
-bind
=
$Sbind
-masters
=
$Mbind
"
$@
"
&
neo
-log_dir
=
$log
storage
-cluster
=
$cluster
-bind
=
$Sbind
-masters
=
$Mbind
"
$@
"
&
}
}
...
@@ -268,24 +268,47 @@ GENsql
...
@@ -268,24 +268,47 @@ GENsql
wait
wait
sync
sync
# build go client
# (we run it several times and in parallel - for go build not to infere with benchmarking)
go build
-o
zhash_go zhash.go
# run benchmarks
# run benchmarks
N
=
`
seq
1
`
# XXX repeat benchmarks N time
N
=
`
seq
1
`
# XXX repeat benchmarks N time
#hashfunc=sha1
#hashfunc=sha1
#hashfunc=adler32
#hashfunc=adler32
#hashfunc=crc32
hashfunc
=
null
hashfunc
=
null
Npar
=
8
# run so many parallel clients in parallel phase
# runpar ... - run several program instances in parallel
runpar
()
{
local
jobv
for
i
in
`
seq
$Npar
`
;
do
"
$@
"
&
jobv
=
"
$jobv
$!
"
done
wait
$jobv
}
# time1 <url> - run benchmarks on the URL once
# time1 <url> - run benchmarks on the URL once
bench1
()
{
bench1
()
{
url
=
$1
url
=
$1
# time demo-zbigarray read $url
# time demo-zbigarray read $url
# ./zhash.py --$hashfunc $url
# ./zhash.py --$hashfunc $url
# echo -e "\n# ${Npar} clients in parallel"
# runpar ./zhash.py --$hashfunc $url
if
[[
$url
==
zeo://
*
]]
;
then
if
[[
$url
==
zeo://
*
]]
;
then
echo
"(skipping zhash.go on ZEO -- Cgo does not support zeo:// protocol)"
echo
"(skipping zhash.go on ZEO -- Cgo does not support zeo:// protocol)"
return
return
fi
fi
go run zhash.go
--log_dir
=
$log
-
$hashfunc
$url
echo
# go run zhash.go --log_dir=$log -$hashfunc -useprefetch $url
./zhash_go
--log_dir
=
$log
-
$hashfunc
$url
# ./zhash_go --log_dir=$log -$hashfunc -useprefetch $url
# echo -e "\n# ${Npar} clients in parallel"
# runpar ./zhash_go --log_dir=$log -$hashfunc $url
}
}
# echo -e "\n*** FileStorage"
# echo -e "\n*** FileStorage"
...
...
go/neo/t/zhash.go
View file @
fd774a65
...
@@ -162,7 +162,7 @@ func zhash(ctx context.Context, url string, h hasher, useprefetch bool) (err err
...
@@ -162,7 +162,7 @@ func zhash(ctx context.Context, url string, h hasher, useprefetch bool) (err err
//defer profile.Start(profile.CPUProfile).Stop()
//defer profile.Start(profile.CPUProfile).Stop()
}
}
for
qqq
:=
0
;
qqq
<
10
;
qqq
++
{
for
qqq
:=
0
;
qqq
<
2
;
qqq
++
{
tstart
:=
time
.
Now
()
tstart
:=
time
.
Now
()
h
.
Reset
()
// XXX temp
h
.
Reset
()
// XXX temp
...
...
go/neo/t/zhash.py
View file @
fd774a65
...
@@ -103,7 +103,7 @@ def main():
...
@@ -103,7 +103,7 @@ def main():
last_tid
=
stor
.
lastTransaction
()
last_tid
=
stor
.
lastTransaction
()
before
=
p64
(
u64
(
last_tid
)
+
1
)
before
=
p64
(
u64
(
last_tid
)
+
1
)
for
zzz
in
range
(
10
):
for
zzz
in
range
(
2
):
tstart
=
time
()
tstart
=
time
()
# vvv h.reset() XXX temp
# vvv h.reset() XXX temp
...
...
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