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: AGENTS.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ CodSpeed Runner is a Rust CLI application for gathering performance data and upl
9
9
## Common Development Commands
10
10
11
11
### Building and Testing
12
+
12
13
```bash
13
14
# Build the project
14
15
cargo build
@@ -32,6 +33,7 @@ cargo test -- --nocapture # with cargo test
32
33
**Note**: Always check if `cargo nextest` is available first (with `cargo nextest --version` or `which cargo-nextest`). If available, use it instead of `cargo test` as it provides faster and more reliable test execution.
33
34
34
35
### Running the Application
36
+
35
37
```bash
36
38
# Build and run
37
39
cargo run -- <subcommand><args>
@@ -43,6 +45,7 @@ cargo run -- setup
43
45
```
44
46
45
47
### Code Quality
48
+
46
49
```bash
47
50
# Check code without building
48
51
cargo check
@@ -59,26 +62,31 @@ cargo clippy
59
62
The application follows a modular structure:
60
63
61
64
### Core Modules
65
+
62
66
-**`main.rs`**: Entry point with error handling and logging setup
63
67
-**`app.rs`**: CLI definition using clap with subcommands (Run, Auth, Setup)
64
68
-**`api_client.rs`**: CodSpeed GraphQL API client
65
69
-**`auth.rs`**: Authentication management
66
70
-**`config.rs`**: Configuration loading and management
67
71
68
72
### Run Module (`src/run/`)
73
+
69
74
The core functionality for running benchmarks:
75
+
70
76
-**`run_environment/`**: CI provider implementations (GitHub Actions, GitLab CI, Buildkite, local)
71
77
-**`runner/`**: Execution modes:
72
78
-**`valgrind/`**: Instrumentation mode using custom Valgrind
73
79
-**`wall_time/perf/`**: Walltime mode with perf integration
74
80
-**`uploader/`**: Results upload to CodSpeed
75
81
76
82
### Key Dependencies
83
+
77
84
-`clap`: CLI framework with derive macros
78
85
-`tokio`: Async runtime (current_thread flavor)
79
86
-`reqwest`: HTTP client with middleware/retry
80
87
-`serde`/`serde_json`: Serialization
81
88
-`gql_client`: Custom GraphQL client
89
+
-`tabled`: Table formatting for CLI output (https://docs.rs/tabled/latest/tabled/index.html)
@@ -90,6 +98,7 @@ The core functionality for running benchmarks:
90
98
## Testing
91
99
92
100
The project uses:
101
+
93
102
-`cargo nextest` (preferred) or standard Rust `cargo test`
94
103
-`insta` for snapshot testing
95
104
-`rstest` for parameterized tests
@@ -98,5 +107,6 @@ The project uses:
98
107
Test files include snapshots in `snapshots/` directories for various run environment providers.
99
108
100
109
**Important**:
110
+
101
111
- Always prefer `cargo nextest run` over `cargo test` when running tests, as it provides better performance and reliability.
102
112
- Some walltime executor tests require `sudo` access and will fail in non-interactive environments (e.g., `test_walltime_executor::*`). These failures are expected if sudo is not available.
0 commit comments