Skip to content

Commit 79b208b

Browse files
Copilothsluoyz
andcommitted
Simplify README documentation to be more concise
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
1 parent 7c51ea3 commit 79b208b

File tree

1 file changed

+8
-38
lines changed

1 file changed

+8
-38
lines changed

README.md

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -176,53 +176,23 @@ go run main.go
176176

177177
Then visit http://localhost:8080/metrics to see the exported metrics.
178178

179-
## Long-Running Test for Prometheus + Grafana
179+
## Long-Running Test
180180

181-
A comprehensive long-running test is available to generate realistic authorization traffic for testing Prometheus and Grafana integration. This test simulates real-world scenarios based on classic access control models:
181+
A long-running test simulates RBAC, ABAC, and ReBAC authorization patterns for testing with Prometheus and Grafana.
182182

183-
- **RBAC (Role-Based Access Control)** - Users with different roles (admin, developer, viewer, guest) accessing various resources
184-
- **ABAC (Attribute-Based Access Control)** - Access decisions based on user attributes (department, clearance level) and resource attributes (classification, owner)
185-
- **ReBAC (Relationship-Based Access Control)** - Access decisions based on relationships between users and resources (ownership, organization membership)
186-
187-
### Running the Long-Running Test
188-
189-
To start the long-running test:
183+
### Usage
190184

191185
```bash
192186
go test -v -run TestLongRunning -timeout 0
193187
```
194188

195-
The test will:
196-
- Start a Prometheus metrics endpoint on `http://localhost:8080/metrics`
197-
- Continuously generate authorization events at a controlled rate (~50-150 requests/second)
198-
- Simulate realistic allow/deny patterns based on access control rules
199-
- Generate policy operation events periodically
200-
- Run indefinitely until interrupted with Ctrl+C
201-
202-
**Note**: The test is designed to be resource-friendly and will not consume excessive CPU or memory. It includes controlled rate limiting with random delays between requests to simulate realistic traffic patterns.
203-
204-
### Using with Prometheus and Grafana
205-
206-
1. Start the long-running test in one terminal:
207-
```bash
208-
go test -v -run TestLongRunning -timeout 0
209-
```
210-
211-
2. Configure Prometheus to scrape the metrics endpoint (see [Prometheus + Grafana Setup](#prometheus--grafana-setup) above)
212-
213-
3. Import the provided Grafana dashboard to visualize the metrics in real-time
189+
The test generates ~50-150 requests/second and exposes metrics on `http://localhost:8080/metrics`. Press Ctrl+C to stop.
214190

215-
4. Observe the metrics being updated continuously, showing:
216-
- Authorization request rates and patterns
217-
- Allow/deny distributions across different domains
218-
- Request latency distributions
219-
- Policy operation metrics
191+
### Integration with Prometheus/Grafana
220192

221-
This test is ideal for:
222-
- Testing Prometheus scraping configuration
223-
- Validating Grafana dashboard functionality
224-
- Demonstrating the logger with realistic traffic
225-
- Performance testing of the metrics collection pipeline
193+
1. Start the test
194+
2. Configure Prometheus to scrape `localhost:8080/metrics`
195+
3. Import the Grafana dashboard from `grafana-dashboard.json`
226196

227197
## License
228198

0 commit comments

Comments
 (0)