Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/src/references/suite.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ GC benchmarks for Julia: https://github.com/JuliaCI/GCBenchmarks
The value is required.
Environment variables will be expanded.

`timeout`: timeout for one invocation of a benchmark in seconds.
The default value is `null`.

`minheap`: a string that selects one of the `minheap_values` sets to use.

`minheap_values`: a dictionary containing multiple named sets of minimal heap sizes that is enough for a benchmark from the suite to run without triggering `Out of Memory!`.
Expand All @@ -231,3 +234,16 @@ An example looks like this:
slow/bigint/pidigits: 198
slow/rb_tree/rb_tree: 8640
```

### Benchmark Specification
Benchmarks can be specified either as strings or as dictionaries.

The keys currently supported in the dictionary form are `name` and `timeout`.

Example:
```yaml
benchmarks:
gcbenchmarks:
- name: serial/gcbench/gcbench
timeout: 30
```
18 changes: 16 additions & 2 deletions src/running/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,8 @@ def __init__(self, **kwargs):
self.name, self.name
)
)
self.timeout: Optional[int]
self.timeout = kwargs.get("timeout")

def __str__(self) -> str:
return "{} JuliaGCBenchmarks {}".format(super().__str__(), self.path)
Expand All @@ -505,13 +507,25 @@ def get_minheap(self, bm: Benchmark) -> int:
return minheap[name]

def get_benchmark(self, bm_spec: Union[str, Dict[str, Any]]) -> "JuliaBenchmark":
assert type(bm_spec) is str
timeout = self.timeout
if type(bm_spec) is str:
name = bm_spec
else:
assert type(bm_spec) is dict
if "name" not in bm_spec:
raise KeyError(
"When a dictionary is used to specify a benchmark, you need to provide `name`"
)
name = bm_spec["name"]
if "timeout" in bm_spec:
timeout = bm_spec["timeout"]
return JuliaBenchmark(
julia_args=[],
suite_name=self.name,
name=bm_spec,
name=name,
suite_path=self.path,
program_args=[],
timeout=timeout,
)

def is_passed(self, output: bytes) -> bool:
Expand Down
Loading