Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
cdist
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
41
Issues
41
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ungleich-public
cdist
Commits
ecc77e55
Commit
ecc77e55
authored
Oct 18, 2019
by
Nico Schottelius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add timing hack / test1
parent
9f1ec6f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
0 deletions
+79
-0
hacking/timing-tests/benchmark-files.sh
hacking/timing-tests/benchmark-files.sh
+79
-0
No files found.
hacking/timing-tests/benchmark-files.sh
0 → 100644
View file @
ecc77e55
#!/bin/sh
num
=
50000
dsthost
=
localhost
tmp
=
$(
mktemp
-d
)
remote_tmp
=
${
tmp
}
-remote
cd
"
$tmp
"
create_files
()
{
i
=
0
while
[
$i
-lt
$num
]
;
do
echo
$i
>
file-
${
i
}
i
=
$((
i+1
))
done
}
delete_remote
()
{
ssh
"
${
dsthost
}
"
"rm -rf
${
remote_tmp
}
"
}
tar_remote
()
{
cd
"
${
tmp
}
"
tar
c
.
| ssh
"
${
dsthost
}
"
"mkdir
${
remote_tmp
}
; cd
${
remote_tmp
}
; tar x"
}
cdist_remote
()
{
(
while
[
$i
-lt
$num
]
;
do
echo
__file
${
remote_tmp
}
/file-
${
i
}
--source
"
${
tmp
}
/file-
${
i
}
"
i
=
$((
i+1
))
done
)
| cdist config
-i
-
-vv
"
${
dsthost
}
"
}
cdist_remote_parallel
()
{
(
while
[
$i
-lt
$num
]
;
do
echo
__file
${
remote_tmp
}
/file-
${
i
}
--source
"
${
tmp
}
/file-
${
i
}
"
i
=
$((
i+1
))
done
)
| cdist config
-j10
-i
-
-vv
"
${
dsthost
}
"
}
echo
"Creating
${
num
}
files"
time
create_files
echo
"scping files"
time
scp
-r
"
${
tmp
}
"
"
${
dsthost
}
:
$remote_tmp
"
>
/dev/null
echo
"delete remote"
time
delete_remote
echo
"taring files"
time
tar_remote
echo
"delete remote"
time
delete_remote
echo
"cdisting files"
time
cdist_remote
echo
"delete remote"
time
delete_remote
echo
"cdisting files (parallel)!"
time
cdist_remote
echo
"delete remote"
time
delete_remote
echo
"delete local"
rm
-rf
"
$tmp
"
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