Documentation ¶
Index ¶
- func AppendToMailbox(cl *client.Client, mailboxName string, literal string, time time.Time, ...) error
- func BuildMailbox(cl *client.Client, mailbox string, messageCount int) error
- func BuildMailboxWithMessages(cl *client.Client, mailbox string, messageCount int, messages []string) error
- func FetchMessage(cl *client.Client, sequenceSet *imap.SeqSet, items ...imap.FetchItem) error
- func FillMailbox(cl *client.Client, mbox string) error
- func NewAppend() benchmark.Benchmark
- func NewCopy() benchmark.Benchmark
- func NewExpunge() benchmark.Benchmark
- func NewFetch() benchmark.Benchmark
- func NewIMAPBenchmarkRun(duration time.Duration, cmdTimings [profiling.CmdTypeTotal][]time.Duration) *reporter.BenchmarkRun
- func NewIMAPBenchmarkRunner(bench IMAPBenchmark) benchmark.Benchmark
- func NewMove() benchmark.Benchmark
- func NewSearch(query SearchQuery) benchmark.Benchmark
- func NewSelect() benchmark.Benchmark
- func NewSequenceSetAll() *imap.SeqSet
- func NewStatus() benchmark.Benchmark
- func NewStore() benchmark.Benchmark
- func RandomSequenceSetNum(max uint32) *imap.SeqSet
- func RandomSequenceSetRange(max uint32) *imap.SeqSet
- func RunParallelClients(addr net.Addr, fn func(*client.Client, uint))
- func RunParallelClientsWithMailbox(addr net.Addr, mbox string, readOnly bool, fn func(*client.Client, uint))
- func RunParallelClientsWithMailboxes(addr net.Addr, mailboxes []MailboxInfo, fn func(*client.Client, uint))
- func SequenceListFromFile(path string) ([]*imap.SeqSet, error)
- func Store(cl *client.Client, sequenceSet *imap.SeqSet, item string, silent bool, ...) error
- func UIDFetchMessage(cl *client.Client, sequenceSet *imap.SeqSet, items ...imap.FetchItem) error
- func UIDStore(cl *client.Client, sequenceSet *imap.SeqSet, item string, silent bool, ...) error
- func WithClient(addr net.Addr, fn func(*client.Client) error) error
- type Append
- type Copy
- type Expunge
- type Fetch
- type IMAPBenchmark
- type IMAPBenchmarkExtra
- type IMAPBenchmarkRunner
- type MailboxInfo
- type Move
- type ParallelSeqSet
- func NewParallelSeqSet(count uint32, numWorkers uint, listFile string, ...) (*ParallelSeqSet, error)
- func NewParallelSeqSetAll(numWorkers uint) *ParallelSeqSet
- func NewParallelSeqSetExpunge(count uint32, numWorkers uint, generateIntervals, uid bool) *ParallelSeqSet
- func NewParallelSeqSetFromFile(path string, numWorkers uint) (*ParallelSeqSet, error)
- func NewParallelSeqSetRandom(count uint32, numWorkers uint, generateIntervals, randomDrain, uid bool) *ParallelSeqSet
- type Search
- type SearchCmdQuery
- func (*SearchCmdQuery) Name() string
- func (s *SearchCmdQuery) Run(ctx context.Context, cl *client.Client, workerIndex uint) error
- func (s *SearchCmdQuery) Setup(ctx context.Context, cl *client.Client, searchCount uint32) error
- func (*SearchCmdQuery) TearDown(ctx context.Context, cl *client.Client) error
- type SearchQuery
- type SearchSinceQuery
- func (*SearchSinceQuery) Name() string
- func (s *SearchSinceQuery) Run(ctx context.Context, cl *client.Client, workerIndex uint) error
- func (s *SearchSinceQuery) Setup(ctx context.Context, cl *client.Client, searchCount uint32) error
- func (*SearchSinceQuery) TearDown(ctx context.Context, cl *client.Client) error
- type SearchTextQuery
- func (s *SearchTextQuery) Name() string
- func (s *SearchTextQuery) Run(ctx context.Context, cl *client.Client, workerIndex uint) error
- func (s *SearchTextQuery) Setup(ctx context.Context, cl *client.Client, searchCount uint32) error
- func (s *SearchTextQuery) TearDown(ctx context.Context, cl *client.Client) error
- type Select
- type Status
- type StoreBench
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToMailbox ¶
func BuildMailbox ¶
BuildMailbox creates a mailbox of name `mailbox` and fills it up with `messageCount` random messages.
func BuildMailboxWithMessages ¶ added in v0.12.0
func FetchMessage ¶
func NewExpunge ¶
func NewIMAPBenchmarkRun ¶
func NewIMAPBenchmarkRun(duration time.Duration, cmdTimings [profiling.CmdTypeTotal][]time.Duration) *reporter.BenchmarkRun
func NewIMAPBenchmarkRunner ¶
func NewIMAPBenchmarkRunner(bench IMAPBenchmark) benchmark.Benchmark
func NewSearch ¶
func NewSearch(query SearchQuery) benchmark.Benchmark
func NewSequenceSetAll ¶
func NewSequenceSetAll() *imap.SeqSet
func RandomSequenceSetNum ¶
func RandomSequenceSetNum(max uint32) *imap.SeqSet
func RandomSequenceSetRange ¶
func RandomSequenceSetRange(max uint32) *imap.SeqSet
func SequenceListFromFile ¶
func UIDFetchMessage ¶
Types ¶
type IMAPBenchmark ¶
type IMAPBenchmark interface { // Name should return the name of the benchmark. It will also be used to match against cli args. Name() string // Setup sets up the benchmark state, this is not timed. Setup(ctx context.Context, addr net.Addr) error // Run performs the actual benchmark, this is timed. Run(ctx context.Context, addr net.Addr) error // TearDown clear the benchmark state, this is not timed. TearDown(ctx context.Context, addr net.Addr) error }
IMAPBenchmark is intended to be used to build benchmarks which bench IMAP commands on a given server.
type IMAPBenchmarkExtra ¶
type IMAPBenchmarkExtra struct {
CMDStatistic [profiling.CmdTypeTotal]*reporter.BenchmarkStatistics
}
func (*IMAPBenchmarkExtra) String ¶
func (i *IMAPBenchmarkExtra) String() string
type IMAPBenchmarkRunner ¶
type IMAPBenchmarkRunner struct {
// contains filtered or unexported fields
}
func (*IMAPBenchmarkRunner) Name ¶
func (i *IMAPBenchmarkRunner) Name() string
func (*IMAPBenchmarkRunner) Run ¶
func (i *IMAPBenchmarkRunner) Run(ctx context.Context) (*reporter.BenchmarkRun, error)
Run performs the actual benchmark, this is timed.
type MailboxInfo ¶
type ParallelSeqSet ¶
type ParallelSeqSet struct {
// contains filtered or unexported fields
}
ParallelSeqSet contains a list of sequence sets which can be used by the benchmarks. Use one of the several new functions to initialize the state. Internally it holds one list per expected worker.
func NewParallelSeqSet ¶
func NewParallelSeqSet(count uint32, numWorkers uint, listFile string, generateAll, generateIntervals, randomDrain, uid bool) (*ParallelSeqSet, error)
NewParallelSeqSet generates a parallel SeqSet based on the following conditions:
- If a listFile is not empty, it will load the sequence sets from that file.
- If generateAll is set to true, it will call NewParallelSeqSetAll.
- If none of the above are valid it will generate random collection of sequence sets which can be single or intervals based on whether generateIntervals is set to true. If randomDrain is set to true, it will generate non repeating sequences. E.g. Useful for move or delete benchmarks. If uid is set to true, it will assume the values are UIDs rather than sequence IDs.
func NewParallelSeqSetAll ¶
func NewParallelSeqSetAll(numWorkers uint) *ParallelSeqSet
NewParallelSeqSetAll generates once sequence set for each worker which covers everything (1:*).
func NewParallelSeqSetExpunge ¶
func NewParallelSeqSetExpunge(count uint32, numWorkers uint, generateIntervals, uid bool) *ParallelSeqSet
NewParallelSeqSetExpunge generates sequence ids or intervals that can be used in cases where the data is expunged and/or moved from the original inbox. It also makes sure that concurrent workers can't overlap to avoid operations on messages that no longer exist.
func NewParallelSeqSetFromFile ¶
func NewParallelSeqSetFromFile(path string, numWorkers uint) (*ParallelSeqSet, error)
NewParallelSeqSetFromFile load the sequence sets from a file. The same sequence set will be assigned to all workers.
func NewParallelSeqSetRandom ¶
func NewParallelSeqSetRandom(count uint32, numWorkers uint, generateIntervals, randomDrain, uid bool) *ParallelSeqSet
NewParallelSeqSetRandom generates count random sequence set for each worker. If generateIntervals is set to true, it will generate intervals rather than a single number. If randomDrain is set to true it will generate unique values that eventually exhaust the problem space.
func (*ParallelSeqSet) Get ¶
func (p *ParallelSeqSet) Get(i uint) []*imap.SeqSet
type SearchCmdQuery ¶ added in v0.12.0
type SearchCmdQuery struct {
// contains filtered or unexported fields
}
func (*SearchCmdQuery) Name ¶ added in v0.12.0
func (*SearchCmdQuery) Name() string
type SearchQuery ¶
type SearchSinceQuery ¶
type SearchSinceQuery struct {
// contains filtered or unexported fields
}
func (*SearchSinceQuery) Name ¶
func (*SearchSinceQuery) Name() string
type SearchTextQuery ¶
type SearchTextQuery struct {
// contains filtered or unexported fields
}
func (*SearchTextQuery) Name ¶
func (s *SearchTextQuery) Name() string
type Select ¶ added in v0.12.0
type Select struct {
// contains filtered or unexported fields
}
type Status ¶ added in v0.12.0
type Status struct {
// contains filtered or unexported fields
}
type StoreBench ¶
type StoreBench struct {
// contains filtered or unexported fields
}
func (*StoreBench) Name ¶
func (*StoreBench) Name() string