From 649acf7974879b0596e82f9c658934ad05e52fb1 Mon Sep 17 00:00:00 2001 From: Mustafa Atik Date: Fri, 21 Oct 2016 11:18:29 +0300 Subject: [PATCH] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }