Skip to content

Commit

Permalink
fix(GODT-1761): imaptest coverage benchmark.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuthix authored and LBeernaertProton committed Oct 26, 2022
1 parent 3c3b138 commit d07d8ad
Show file tree
Hide file tree
Showing 7 changed files with 386 additions and 65 deletions.
50 changes: 31 additions & 19 deletions benchmarks/imaptest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
94 changes: 94 additions & 0 deletions benchmarks/imaptest/benchmark.yml
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
10 changes: 0 additions & 10 deletions benchmarks/imaptest/default.sh

This file was deleted.

25 changes: 0 additions & 25 deletions benchmarks/imaptest/full.sh

This file was deleted.

Loading

0 comments on commit d07d8ad

Please sign in to comment.