Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iipimage-benchtest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jerome Chauveau
iipimage-benchtest
Commits
53a687d3
You need to sign in or sign up before continuing.
Commit
53a687d3
authored
4 years ago
by
Jerome Chauveau
Browse files
Options
Downloads
Patches
Plain Diff
option T pour la durée du test - suppression option r.
parent
21fc5b50
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+3
-3
3 additions, 3 deletions
README.md
doit.sh
+25
-30
25 additions, 30 deletions
doit.sh
with
28 additions
and
33 deletions
README.md
+
3
−
3
View file @
53a687d3
...
...
@@ -10,13 +10,13 @@
```
$ chmod u+x doit.sh
$ ./doit.sh -c <nb clients> -
r <nb runs> -t <nb tests
> -u <url dataset size> -endpoint <image url>
$ ./doit.sh -c <nb clients> -
t <test_duration
> -u <url dataset size> -endpoint <image url>
```
Example
:
Example
- 10 clients during 5 minutes fetching among 500 urls.
```
$ ./doit.sh -c 10
-r 20
-t 5 -u 500 -endpoint https://localhost/fcgi-bin/iipsrv.fcgi?IIIF=/img.tif/
$ ./doit.sh -c 10 -t 5
M
-u 500 -endpoint https://localhost/fcgi-bin/iipsrv.fcgi?IIIF=/img.tif/
```
Help :
...
...
This diff is collapsed.
Click to expand it.
doit.sh
+
25
−
30
View file @
53a687d3
...
...
@@ -3,9 +3,9 @@
DIRECTORY
=
$(
cd
`
dirname
$0
`
&&
pwd
)
URLS_FILE
=
$DIRECTORY
/urls.txt
N_CLIENTS
=
100
N_RUNS
=
10
#
N_RUNS=10
N_URLS
=
2000
N_TESTS
=
1
TIME
=
1
M
MAX_WIDTH
=
1920
MAX_HEIGHT
=
1080
...
...
@@ -17,13 +17,12 @@ display_usage(){
echo
" ./doit.sh [options] -endpoint [endpoint url]"
echo
" -h : Displays help."
echo
" -c : Specifies number of Siege clients / concurrent users. Default = 100."
echo
" -r : Specifies number of Siege runs. Default = 10."
echo
" -t : Specifies number of tests. A new urls dataset is generated for each test. Default = 1."
echo
" -t : Specifies test duration. Default = 1 minute (1M)."
echo
" -u : Specifies number of generated URLS (urls.txt). Default = 2000."
echo
" -endpoint : Specifies IIIF image URL to query. Required."
echo
""
echo
" Example : "
echo
" ./doit.sh -c 10 -
r
2
0 -t 5
-u 500 -endpoint https://localhost/fcgi-bin/iipsrv.fcgi?IIIF=/img.tif/"
echo
" ./doit.sh -c 10 -
t
2
M
-u 500 -endpoint https://localhost/fcgi-bin/iipsrv.fcgi?IIIF=/img.tif/"
echo
""
}
...
...
@@ -34,7 +33,7 @@ while [[ "$#" -gt 0 ]]; do
-c
)
N_CLIENTS
=
"
$2
"
;
shift
;;
-r
)
N_RUNS
=
"
$2
"
;
shift
;;
-u
)
N_URLS
=
"
$2
"
;
shift
;;
-t
)
N_TESTS
=
"
$2
"
;
shift
;;
-t
)
TIME
=
"
$2
"
;
shift
;;
-endpoint
)
ENDPOINT
=
"
$2
"
;
shift
;;
*
)
echo
"Unknown parameter passed:
$1
"
;
exit
1
;;
esac
...
...
@@ -49,31 +48,27 @@ then
exit
1
fi
run
(){
if
[
-f
$URLS_FILE
]
;
then
echo
"removes existing urls file"
rm
*
.txt
echo
"Removing existing urls file and previous CSV output."
rm
out.csv
rm
$URLS_FILE
fi
width
=
$(
curl
-s
-k
$ENDPOINT
'info.json'
|jq .width
)
height
=
$(
curl
-s
-k
$ENDPOINT
'info.json'
|jq .height
)
echo
"Image dimensions = "
$width
" * "
$height
for
((
i
=
1
;
i<
=
$N_URLS
;
i++
))
;
do
w
=
$((
RANDOM
%
$MAX_WIDTH
))
h
=
$((
RANDOM
%
$MAX_HEIGHT
))
w
=
$((
(
RANDOM
%
$MAX_WIDTH
)
+
1
))
h
=
$((
(
RANDOM
%
$MAX_HEIGHT
)
+
1
))
x
=
$((
(
RANDOM
%
(
$width
-
$w
))
))
y
=
$((
(
RANDOM
%
(
$height
-
$h
))
))
tile_width
=
$((
(
RANDOM
%
(
$w
-
1
)
)
+ 1
))
tile_width
=
$((
(
RANDOM
%
$w
)
+
1
))
url
=
$ENDPOINT$x
','
$y
','
$w
','
$h
'/'
$tile_width
',/0/default.jpg'
echo
$url
>>
$URLS_FILE
done
siege
-v
-c
$N_CLIENTS
-r
$N_RUNS
-f
$URLS_FILE
>
out-
$1
.txt
}
for
((
nrun
=
1
;
nrun<
=
$N_TESTS
;
nrun++
))
;
do
echo
"====================="
echo
"RUNNING TEST "
$nrun
echo
"---------------------"
run
$nrun
done
siege
-v
-c
$N_CLIENTS
-f
$URLS_FILE
-t
$TIME
>
out.csv
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment