Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
muatik authored Oct 21, 2016
1 parent 2db7f7d commit 649acf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ You would want control over how many times should the flask profiler take sample
You can supply a function and control the sampling according to your business logic.

Example 1: Sample 1 in 100 times with random numbers
```json
```python
app.config["flask_profiler"] = {
"sampling_function": True if random.sample(list(range(1, 101)), 1) == [42] else False
}
```

Example 2: Sample for specific users
```json
```python
app.config["flask_profiler"] = {
"sampling_function": True if user is 'divyendu' else False
}
Expand Down

0 comments on commit 649acf7

Please sign in to comment.