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
a4a18b55
Commit
a4a18b55
authored
Oct 05, 2017
by
Kirill Smelkov
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X first cut on C-state profiling
parent
630a742b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
4 deletions
+57
-4
go/neo/t/neotest
go/neo/t/neotest
+57
-4
No files found.
go/neo/t/neotest
View file @
a4a18b55
...
@@ -166,7 +166,7 @@ init_fs() {
...
@@ -166,7 +166,7 @@ init_fs() {
mysock
=
$(
realpath
$neosql
)
/my.sock
# NEO/py: mariadb socket
mysock
=
$(
realpath
$neosql
)
/my.sock
# NEO/py: mariadb socket
}
}
# cluster name
#
NEO
cluster name
cluster
=
pygotest
cluster
=
pygotest
# control started NEO cluster
# control started NEO cluster
...
@@ -575,18 +575,67 @@ system_info() {
...
@@ -575,18 +575,67 @@ system_info() {
# ---- benchmarking ----
# ---- benchmarking ----
# cpustat ... - run ... and print CPU C-states statistic
cpustat
()
{
syscpu
=
/sys/devices/system/cpu
cpuv
=(
`
ls
-vd
$syscpu
/cpu[0-9]
*
`
)
# XXX we assume cpuidle states are the same for all cpus and get list of them from cpu0
statev
=(
`
ls
-vd
${
cpuv
[0]
}
/cpuidle/state[0-9]
*
|xargs
-n
1
basename
`
)
# get current [state]usage. usage for a state is summed accreso all cpus
statev_usage
()
{
usagev
=()
for
s
in
${
statev
[*]
}
;
do
#echo >&2 $s
susage
=
0
for
u
in
`
cat
$syscpu
/cpu[0-9]
*
/cpuidle/
$s
/usage
`
;
do
#echo -e >&2 "\t$u"
((
susage+
=
$u
))
done
usagev+
=(
$susage
)
done
echo
${
usagev
[*]
}
}
ustartv
=(
`
statev_usage
`
)
#echo >&2 "--------"
#sleep 1
out
=
"
$(
"
$@
"
)
"
uendv
=(
`
statev_usage
`
)
stat
=
"#"
for
((
i
=
0
;
i<
${#
statev
[*]
}
;
i++
))
;
do
s
=
${
statev
[
$i
]
}
sname
=
`
cat
${
cpuv
[0]
}
/cpuidle/
$s
/name
`
du
=
$((${
uendv
[
$i
]
}
-
${
ustartv
[
$i
]
}))
#stat+=" $sname(+$du)"
stat
+
=
"
$sname
·
$du
"
#stat+=" $du·$sname"
done
if
[
`
echo
"
$out
"
|
wc
-l
`
-gt
1
]
;
then
echo
"
$out
"
echo
"
$stat
"
else
echo
-n
"
$out
"
echo
-e
"
\t
$stat
"
fi
}
Nrun
=
4
# repeat benchmarks N time
Nrun
=
4
# repeat benchmarks N time
Npar
=
8
# run so many parallel clients in parallel phase
Npar
=
8
# run so many parallel clients in parallel phase
#profile=
profile
=
cpustat
# nrun ... - run ... $Nrun times serially
# nrun ... - run ... $Nrun times serially
nrun
()
{
nrun
()
{
for
i
in
`
seq
$Nrun
`
;
do
for
i
in
`
seq
$Nrun
`
;
do
"
$@
"
$profile
"
$@
"
done
done
}
}
# nrunpar ... - run $Npar ... instances in parallel and wait for completion
# nrunpar ... - run $Npar ... instances in parallel and wait for completion
nrunpar
()
{
_
nrunpar
()
{
local
jobv
local
jobv
for
i
in
`
seq
$Npar
`
;
do
for
i
in
`
seq
$Npar
`
;
do
"
$@
"
&
"
$@
"
&
...
@@ -595,6 +644,10 @@ nrunpar() {
...
@@ -595,6 +644,10 @@ nrunpar() {
wait
$jobv
wait
$jobv
}
}
runpar
()
{
$profile
_runpar
"
$@
"
}
# bench_disk - print disk identification and benchmark direct (uncached) and cached random reads
# bench_disk - print disk identification and benchmark direct (uncached) and cached random reads
bench_disk
()
{
bench_disk
()
{
echo
-e
"
\n
*** random direct (no kernel cache) 4K-read disk latency"
echo
-e
"
\n
*** random direct (no kernel cache) 4K-read disk latency"
...
@@ -614,7 +667,7 @@ bench_disk() {
...
@@ -614,7 +667,7 @@ bench_disk() {
hashfunc
=
crc32
hashfunc
=
crc32
#hashfunc=null
#hashfunc=null
# bench <url> - run benchmarks against URL
# bench <url> - run
ZODB client
benchmarks against URL
bench
()
{
bench
()
{
# XXX show C states usage diff after each benchmark XXX + same for P-states
# XXX show C states usage diff after each benchmark XXX + same for P-states
# XXX +cpufreq transition statistics (CPU_FREQ_STAT)
# XXX +cpufreq transition statistics (CPU_FREQ_STAT)
...
...
Kirill Smelkov
@kirr
mentioned in commit
a60c472c
·
Jul 12, 2018
mentioned in commit
a60c472c
mentioned in commit a60c472c76da315f918afeb06f994c8610cf7c84
Toggle commit list
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