-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(GODT-1761): imaptest coverage benchmark.
- Loading branch information
1 parent
3c3b138
commit d07d8ad
Showing
7 changed files
with
386 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,39 +3,51 @@ | |
This "benchmark" uses [Dovecot's ImapTest tool](https://imapwiki.org/ImapTest) to profile the performance of Gluon. The | ||
information present here can also be used to verify the compliance of Gluon with the IMAP protocol. | ||
|
||
## Installation | ||
Build gluon demo in project root folder: | ||
|
||
```bash | ||
go build -o gluon-demo ./demo/demo.go | ||
``` | ||
|
||
## Installation of ImapTest | ||
|
||
Follow the instructions outlined in [the tools' installation page](https://imapwiki.org/ImapTest/Installation) | ||
to build the binary. The test mailbox is already present in this folder. | ||
|
||
## Running ImapTest | ||
## Simple ImapTest run | ||
|
||
The bare minimum required for running ImapTest is a username and a password: | ||
Assuming gluon demo is running, the bare minimum required for running ImapTest is a username and a password: | ||
|
||
```bash | ||
imaptest host=127.0.0.1 port=1143 [email protected] pass=password1 | ||
``` | ||
|
||
For convenience, we have provided a few test scripts to quickly test Gluon with the demo binary present in this | ||
repository. | ||
## Advance testing | ||
|
||
The multiple scenario coverage can be run by | ||
|
||
* **default.sh**: Runs the default ImapTest benchmarks. | ||
* **full.sh**: Runs every available ImapTest operation. | ||
``` | ||
go test | ||
``` | ||
|
||
Both of these scripts can be customized with the following environment variables: | ||
The test cases are defined in `benchmark.yml`. Each case defines a number of | ||
clients and users to be used by ImapTest. One case can have multiple | ||
settings defined by name. The options are specified in `settings` section. The | ||
settings reflects ImapTest options as described in | ||
[here](https://imapwiki.org/ImapTest/Running). | ||
The ImapTest states are described in | ||
[here](https://imapwiki.org/ImapTest/States). | ||
|
||
* **IMAPTEST_BIN**: Location of the ImapTest binary. | ||
* **SECS**: Number of seconds for which to run ImapTest. | ||
* **CLIENTS**: Number of concurrent clients used by ImapTest. | ||
We don't use for now the ImapTest scriptable scenarios but it is | ||
possible by defining the new test settings in file `./benchmark.yml` and | ||
creating separate definition file like example | ||
[here](https://github.com/dovecot/imaptest/tree/main/src/tests) | ||
|
||
Example: | ||
```bash | ||
# Run imaptest for 60s with one conccurent client connection. | ||
IMAPTEST_BIN=/bin/imaptest SECS=60 CLIENTS=1 ./default.sh | ||
``` | ||
|
||
## Note about this tool | ||
The execution of this tool is non-deterministic, this means it can't be used to compare profile runs of two different | ||
versions. | ||
|
||
It should be only be used to profile and/or stress the codebase in an isolation. | ||
The execution of this tool is non-deterministic, this means it can't be used to | ||
compare profile runs of two different versions. | ||
|
||
It should be only be used to profile and/or stress the codebase in an | ||
isolation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
|
||
--- | ||
|
||
cases: | ||
- users: 1 | ||
clients: 1 | ||
settings: | ||
- simple | ||
- users: 10 | ||
clients: 10 | ||
settings: | ||
- simple | ||
|
||
|
||
.OFF.cases: | ||
- users: 1 | ||
clients: 10 | ||
settings: | ||
- full | ||
- users: 1 | ||
clients: 100 | ||
settings: | ||
- simple | ||
- full | ||
- users: 1 | ||
clients: 1000 | ||
settings: | ||
- simple | ||
- full | ||
|
||
- users: 10 | ||
clients: 10 | ||
settings: | ||
- full | ||
- users: 10 | ||
clients: 100 | ||
settings: | ||
- simple | ||
- full | ||
|
||
- users: 100 | ||
clients: 100 | ||
settings: | ||
- simple | ||
- full | ||
- users: 100 | ||
clients: 1000 | ||
settings: | ||
- simple | ||
- full | ||
|
||
- users: 1000 | ||
clients: 1000 | ||
settings: | ||
- simple | ||
- full | ||
- users: 1000 | ||
clients: 10000 | ||
settings: | ||
- simple | ||
- full | ||
|
||
settings: | ||
simple: | ||
mbox: dovecot-crlf | ||
secs: 10 | ||
no_pipelining: true | ||
simple-with-checks: | ||
mbox: dovecot-crlf | ||
secs: 10 | ||
checkpoint: 3 | ||
no_pipelining: true | ||
own_msgs: true | ||
own_flags: true | ||
full: | ||
mbox: dovecot-crlf | ||
no_pipelining: false | ||
secs: 60 | ||
mcreate: 50 | ||
mdelete: 50 | ||
uidf: 50 | ||
search: 30 | ||
noop: 15 | ||
fetch: 50 | ||
login: 100 | ||
logout: 100 | ||
list: 50 | ||
select: 100 | ||
fet2: 100,30 | ||
copy: 30,5 | ||
store: 50 | ||
delete: 100 | ||
expunge: 100 | ||
append: 100,5 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.