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
c1300da3
Commit
c1300da3
authored
Mar 01, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6ade4c8c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
11 deletions
+4
-11
go/neo/t/neotest
go/neo/t/neotest
+1
-1
go/neo/t/tcpu.go
go/neo/t/tcpu.go
+1
-6
go/neo/t/tcpu.py
go/neo/t/tcpu.py
+2
-4
No files found.
go/neo/t/neotest
View file @
c1300da3
...
...
@@ -906,7 +906,7 @@ bench_cpu() {
echo
-ne
"node:
\t
"
;
xhostname
echo
"cluster:"
nrun sh
-c
"python -m test.pystone |tail -1 |sed -e
\
\"
s|^This machine benchmarks at
\(
[0-9.]
\+\)
pystones/second
$|
Benchmark
`
xhostname
`
/
pystone 1
\1
pystone/s|
\"
"
\"
s|^This machine benchmarks at
\(
[0-9.]
\+\)
pystones/second
$|
Benchmarkpystone 1
\1
pystone/s|
\"
"
sizev
=
"1024 4096
$((
2
*
1024
*
1024
))
"
benchv
=
"adler32 crc32 sha1"
...
...
go/neo/t/tcpu.go
View file @
c1300da3
...
...
@@ -75,12 +75,7 @@ func benchit(benchname string, bencharg string, benchf func(*testing.B, string))
benchf
(
b
,
bencharg
)
})
hostname
,
err
:=
os
.
Hostname
()
if
err
!=
nil
{
hostname
=
"?"
}
fmt
.
Printf
(
"Benchmark%s/%s/go/%s %d
\t
%.3f µs/op
\n
"
,
hostname
,
benchname
,
prettyarg
(
bencharg
),
r
.
N
,
float64
(
r
.
T
)
/
float64
(
r
.
N
)
/
float64
(
time
.
Microsecond
))
fmt
.
Printf
(
"Benchmark%s/go/%s %d
\t
%.3f µs/op
\n
"
,
benchname
,
prettyarg
(
bencharg
),
r
.
N
,
float64
(
r
.
T
)
/
float64
(
r
.
N
)
/
float64
(
time
.
Microsecond
))
}
...
...
go/neo/t/tcpu.py
View file @
c1300da3
...
...
@@ -28,7 +28,6 @@ import tzodb
import
zlib
from
time
import
time
from
math
import
ceil
,
log10
import
socket
# fmtsize formats size in human readable form
_unitv
=
"BKMGT"
# (2^10)^i represents by corresponding char suffix
...
...
@@ -102,13 +101,12 @@ def benchit(benchf, bencharg, ttarget = 1.):
b
.
stop_timer
()
t
=
b
.
total_time
()
hostname
=
socket
.
gethostname
()
benchname
=
benchf
.
__name__
if
benchname
.
startswith
(
'bench_'
):
benchname
=
benchname
[
len
(
'bench_'
):]
print
(
'Benchmark%s/
%s/
py/%s %d
\
t
%.3f µs/op'
%
(
hostname
,
benchname
,
prettyarg
(
bencharg
),
n
,
t
*
1E6
/
n
))
print
(
'Benchmark%s/py/%s %d
\
t
%.3f µs/op'
%
(
benchname
,
prettyarg
(
bencharg
),
n
,
t
*
1E6
/
n
))
# ---- 8< ----
...
...
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