diff --git a/README.md b/README.md index 66abe1e..42d3deb 100644 --- a/README.md +++ b/README.md @@ -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 }