Skip to content

Commit 3df0dbe

Browse files
authored
Merge pull request #29 from JuliaPerf/dev
Document updates, bug fixes and some other pending things
2 parents 6fd0622 + c2382b6 commit 3df0dbe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+3034
-2009
lines changed
-1.55 MB
Binary file not shown.
-1.55 MB
Binary file not shown.
-7.81 KB
Binary file not shown.

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
name = "PerfTest"
22
uuid = "1dca261b-fc56-4a8c-a7e2-9798d8a75978"
33
authors = ["Dvegrod <dvegrodu@gmail.com>, Samuel Omlin <samuel.omlin@cscs.ch>, and contributors"]
4-
version = "0.1.0"
4+
version = "0.1.5"
55

66
[deps]
77
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
88
Configurations = "5218b696-f38b-4ac9-8b61-a12ec717816d"
99
CountFlops = "1db9610d-79e1-487a-8d40-77f3295c7593"
1010
CpuId = "adafc99b-e345-5852-983c-f28acb93d879"
1111
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
12+
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
1213
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
1314
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
15+
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
1416
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1517
MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078"
1618
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"

docs/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ MarkdownExtensions.expand_reflinks(reflinks; rootdir=DOCSRC)
2222

2323
@info "Building documentation website using Documenter.jl..."
2424
makedocs(;
25-
modules = [PerfTest, PerfTest.Configuration],
25+
modules = [PerfTest, PerfTest.Configuration, PerfTest.BencherREST],
2626
authors = "Daniel Sergio Vega Rodriguez, Samuel Omlin, and contributors",
2727
repo = "https://github.com/JuliaPerf/PerfTest.jl/blob/{commit}{path}#{line}",
2828
sitename = "PerfTest.jl",
@@ -35,6 +35,7 @@ makedocs(;
3535
#assets = [asset("https://img.shields.io/github/stars/JuliaPerf/PerfTest.jl.svg", class = :ico)],
3636
#warn_outdated = true,
3737
),
38+
warnonly = [:missing_docs],
3839
pages = [
3940
"Introduction" => "index.md",
4041
"Usage" => "usage.md",

docs/src/api.MD

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,43 @@ Order = [:function, :macro]
3333
```
3434
#### Documentation
3535
```@autodocs
36-
Modules = [PerfTest, PerfTest.Configuration, PerfTest.BencherInterface]
36+
Modules = [PerfTest, PerfTest.Configuration, PerfTest.BencherREST]
3737
Order = [:function, :macro]
3838
```
39+
40+
41+
## Translation ruleset and priority:
42+
43+
PerfTest.jl translates a declarative recipe file for performance tests into a Julia expression that can actually execute them. The traslation prodedure is done by walking through the recipe code whilst trying to do pattern matching with a set of translation rules. The translation rules are totally ordered, which means that there is a clear hierarchy on which pattern is translated in case an expression fits two patterns at the same time. Below there is a full list of the rules, in decreasing order by priority. Given the way the macros in the package are declared there should not be ambiguous pattern matching but for further safety the priority is enforced.
44+
45+
1. @testset macro
46+
2. @test macro
47+
3. @test_throws macro
48+
4. @test_logs macro
49+
5. @inferred macro
50+
6. @test_deprecated macro
51+
7. @test_warn macro
52+
8. @test_nowarn macro
53+
9. @test_broken macro
54+
10. @test_skip macro
55+
11. @perftest macro
56+
12. Back context token, internal use only
57+
13. Prefix placement token, internal use only
58+
14. Suffix placement token, internal use only
59+
15. @config macro
60+
16. @on_perftest_exec macro
61+
17. @on_perftest_ignore macro
62+
18. @define_memory_throughput macro
63+
19. @define_metric macro
64+
20. @define_benchmark macro
65+
21 @roofline macro
66+
22. @auxiliary_metric macro
67+
23. @perfcompare macro
68+
24. Recursivity rule, used for includes inside testsets
69+
70+
Inside a @perftest macro the expression has to be manipulated to be able tu use local variables in a global context (a requirement of [BenchmarkTools.jl]). The rules have the following priority:
71+
72+
1. Assignment pattern rule: a = b
73+
2. Function argument pattern rule: f(arg)
74+
3. Vectorized function call pattern rule: f.(arg)
75+
4. Dot operator pattern rule: a.b

docs/src/examples/mock2-memorythroughput.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ end
3535

3636
a = rand(Int, N)
3737

38-
# To use a variable in macro formulas, it has to be exported (i.e. N)
39-
@export_vars N
4038
# The ratio sets the threshold, being 1.0 the maximum empirical bandwidth and 0.6 = 60% of such maximum
4139
@define_eff_memory_throughput ratio=0.6 begin
4240
# The main block of the macro holds the formula for the bandwidth (therefore BYTES divided by SECONDS) on

docs/src/examples/mock3-roofline.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ end
3737
coeff = rand(N)
3838
x = 1.0
3939

40-
# To use a variable in macro formulas, it has to be exported (i.e. N)
41-
@export_vars N
4240
@roofline actual_flops=:autoflop target_ratio=0.1 begin
4341
:autoflop / ((1 + N)*4)
4442
end

docs/src/index.MD

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,30 @@ The package `PerfTest` provides the user with a performance regression unit test
33

44
## Dependencies
55
`PerfTest` relies on:
6-
- [MacroTools]
7-
- [JLD2]
8-
- [MPI]
9-
- [STREAMBenchmark]
10-
- [GFlops]
11-
- [UnicodePlots]
12-
- [Test]
13-
- [Suppressor]
14-
6+
- BenchmarkTools
7+
- Configurations
8+
- CountFlops
9+
- CpuId
10+
- Dates
11+
- HTTP
12+
- JLD2
13+
- JSON
14+
- LibGit2
15+
- LinearAlgebra
16+
- MLStyle
17+
- MacroTools
18+
- Pkg
19+
- Printf
20+
- Revise
21+
- STREAMBenchmark
22+
- Suppressor
23+
- TOML
24+
- Test
25+
- UnicodePlots
1526
## Contributors
1627
This project has been developed as a Master's thesis by Daniel Sergio Vega Rodriguez.
1728
Thus, the contributors to this project have been so far:
18-
- Daniel Sergio Vega Rodriguez ([@Dvegrod](https://github.com/Dvegrod)), Università della Svizzera italiana (USI): developer
19-
- Dr. Samuel Omlin ([@omlins](https://github.com/omlins)), Swiss National Supercomputing Centre (CSCS), ETH Zurich: original idea and Master's thesis supervisor
20-
- Prof. Olaf Schenk, Università della Svizzera italiana (USI): Master's thesis supervisor
29+
- Daniel Sergio Vega Rodriguez ([@Dvegrod](https://github.com/Dvegrod)), Università della Svizzera italiana (USI): package developer
30+
- Dr. Samuel Omlin ([@omlins](https://github.com/omlins)), Swiss National Supercomputing Centre (CSCS), ETH Zurich: original idea and supervisor
31+
- Prof. Olaf Schenk, Università della Svizzera italiana (USI): PhD supervisor
2132
- Dr. Pasadakis Dimosthenis, Università della Svizzera italiana (USI): additional advisor

docs/src/limitations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ There are a couple of things to keep into consideration when using the package:
99
## Features to be expected in the next versions:
1010

1111
1. Easier access to performance suite results after execution
12-
2. Simplification of the package structure, there will be an emphasis on making the package easy to extend for unfamiliarised developers (hopefully by June 2025)
13-
3. Access to performance counter values through LIKWID (hopefully by June 2025)
12+
2. Simplification of the package structure, there will be an emphasis on making the package easy to extend for unfamiliarised developers
13+
3. Access to performance counter values through LIKWID
1414
4. Alternative regression testing against git commits instead of last execution for easier testing

0 commit comments

Comments
 (0)