cwlbraa-benchmarks
This module contains a series of functions intended to stress the engine in various ways.Many are adapted from Dagger's core integration tests.
Installation
dagger install github.com/cwlbraa/cwlbraa-daggerverse/benchmarks@47053cc713986ca54afe99df6e50395b9ffff4c2Entrypoint
Return Type
CwlbraaBenchmarks Example
dagger -m github.com/cwlbraa/cwlbraa-daggerverse/benchmarks@47053cc713986ca54afe99df6e50395b9ffff4c2 call \
func (m *MyModule) Example() *dagger.CwlbraaBenchmarks {
return dag.
CwlbraaBenchmarks()
}@function
def example() -> dagger.CwlbraaBenchmarks:
return (
dag.cwlbraa_benchmarks()
)@func()
example(): CwlbraaBenchmarks {
return dag
.cwlbraaBenchmarks()
}Types
CwlbraaBenchmarks 🔗
ioTest() 🔗
Return Type
Void ! Example
dagger -m github.com/cwlbraa/cwlbraa-daggerverse/benchmarks@47053cc713986ca54afe99df6e50395b9ffff4c2 call \
io-testfunc (m *MyModule) Example(ctx context.Context) {
return dag.
CwlbraaBenchmarks().
IoTest(ctx)
}@function
async def example() -> None:
return await (
dag.cwlbraa_benchmarks()
.io_test()
)@func()
async example(): Promise<void> {
return dag
.cwlbraaBenchmarks()
.ioTest()
}containerEcho() 🔗
Returns a container that echoes whatever string argument is provided
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| stringArg | String ! | - | No description provided |
Example
dagger -m github.com/cwlbraa/cwlbraa-daggerverse/benchmarks@47053cc713986ca54afe99df6e50395b9ffff4c2 call \
container-echo --string-arg stringfunc (m *MyModule) Example(stringArg string) *dagger.Container {
return dag.
CwlbraaBenchmarks().
ContainerEcho(stringArg)
}@function
def example(string_arg: str) -> dagger.Container:
return (
dag.cwlbraa_benchmarks()
.container_echo(string_arg)
)@func()
example(stringArg: string): Container {
return dag
.cwlbraaBenchmarks()
.containerEcho(stringArg)
}benchmarkEcho() 🔗
Return Type
Void ! Example
dagger -m github.com/cwlbraa/cwlbraa-daggerverse/benchmarks@47053cc713986ca54afe99df6e50395b9ffff4c2 call \
benchmark-echofunc (m *MyModule) Example(ctx context.Context) {
return dag.
CwlbraaBenchmarks().
BenchmarkEcho(ctx)
}@function
async def example() -> None:
return await (
dag.cwlbraa_benchmarks()
.benchmark_echo()
)@func()
async example(): Promise<void> {
return dag
.cwlbraaBenchmarks()
.benchmarkEcho()
}benchmarkModules() 🔗
CwlbraaBenchmarksModules creates a stack of nested Dagger modules to benchmark performance
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| cliBin | File ! | - | No description provided |
Example
dagger -m github.com/cwlbraa/cwlbraa-daggerverse/benchmarks@47053cc713986ca54afe99df6e50395b9ffff4c2 call \
benchmark-modules --cli-bin file:pathfunc (m *MyModule) Example(cliBin *dagger.File) *dagger.Directory {
return dag.
CwlbraaBenchmarks().
BenchmarkModules(cliBin)
}@function
def example(cli_bin: dagger.File) -> dagger.Directory:
return (
dag.cwlbraa_benchmarks()
.benchmark_modules(cli_bin)
)@func()
example(cliBin: File): Directory {
return dag
.cwlbraaBenchmarks()
.benchmarkModules(cliBin)
}testPacketLoss() 🔗
Return Type
String ! Example
dagger -m github.com/cwlbraa/cwlbraa-daggerverse/benchmarks@47053cc713986ca54afe99df6e50395b9ffff4c2 call \
test-packet-lossfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
CwlbraaBenchmarks().
TestPacketLoss(ctx)
}@function
async def example() -> str:
return await (
dag.cwlbraa_benchmarks()
.test_packet_loss()
)@func()
async example(): Promise<string> {
return dag
.cwlbraaBenchmarks()
.testPacketLoss()
}