You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/index.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,17 @@ This bot can be used offline or online.
20
20
21
21
Follow these steps to set up SnoopCompile bot for your package.
22
22
23
-
## 1 - Setting up the SnoopCompile bot configuration folder
23
+
## 1 - Add Julia to your system PATH (if you haven't done that already)
24
+
25
+
The CompileBot spawns a new Julia process when running the `snoop_bot` function. Therefore, you need to make sure that Julia is added to your system PATH. See the official documentation on how to do that: https://julialang.org/downloads/platform/. To test whether Julia has been added successfully, simply open a terminal and type in `julia`. If everything has been configured correctly, the Julia REPL should be invoked now.
26
+
27
+
## 2 - Setting up the SnoopCompile bot configuration folder
24
28
25
29
Here, we will configure the bot in a directory `deps/SnoopCompile/` that should be added to your repository.
26
30
All configuration files for the SnoopCompile bot should go in this directory.
27
31
If you choose a different name for this directory, be sure to change the path in the configuration steps below.
28
32
29
-
## 2 - Create the precompile script
33
+
## 3 - Create the precompile script
30
34
31
35
You will need a [precompile script](@ref pcscripts), here called `example_script.jl`, that "exercises" the functionality you'd like to precompile.
32
36
If you write a dedicated precompile script, place it in the bot configuration folder.
@@ -35,7 +39,7 @@ Alternatively, you may use your package's `"runtests.jl"` file.
35
39
While less precise about which functionality is worthy of precompilation,
36
40
this can slightly simplify configuration as described below.
37
41
38
-
## 3 - Create the script that runs `snoop_bot`
42
+
## 4 - Create the script that runs `snoop_bot`
39
43
40
44
The `snoop_bot` function generates precompile statements and writes them to
41
45
a file that will be incorporated into your package.
@@ -90,7 +94,7 @@ with `snoop_bot(config, :(using MyPackage))`.
90
94
91
95
You can override this default behavior with a keyword argument, see [`snoop_bot`](@ref) for details.
92
96
93
-
## 4 - Optionally test the impact of your precompiles with `snoop_bench`
97
+
## 5 - Optionally test the impact of your precompiles with `snoop_bench`
94
98
95
99
Call [`snoop_bench`](@ref) to measure the effect of adding precompile files.
96
100
It takes the same parameters as `snoop_bot` above.
@@ -101,7 +105,7 @@ instead.
101
105
Note that benchmarking has the option of different performance metrics,
102
106
`snoop_mode=:snoopi` or `snoop_mode=:run_time` depending on whether you want to measure inference time or the run time of your precompile script.
103
107
104
-
## 5 - Configure the bot to run with a GitHub Action file
108
+
## 6 - Configure the bot to run with a GitHub Action file
105
109
106
110
You can create the precompile files automatically when you merge pull requests to `master` by adding a workflow file under `.github/workflows/SnoopCompile.yml`.
107
111
This file should have content such as the example below.
0 commit comments