fib(40) results:
$ hyperfine --warmup 3 \
'chaos dev.kaos' \
'python3 dev.py' \
'ruby dev.rb' \
'php dev.php'
Benchmark #1: chaos dev.kaos
Time (mean ± σ): 954.4 ms ± 4.1 ms [User: 953.6 ms, System: 0.5 ms]
fib(40) results:
$ hyperfine --warmup 3 \
'chaos dev.kaos' \
'python3 dev.py' \
'ruby dev.rb' \
'php dev.php'
Benchmark #1: chaos dev.kaos
Time (mean ± σ): 954.4 ms ± 4.1 ms [User: 953.6 ms, System: 0.5 ms]
| { | |
| "page": 1, | |
| "results": [{% for n in range(range(100) | random) %} | |
| { | |
| "adult": {{ fake.boolean(chance_of_getting_true=25) | lower }}, | |
| "backdrop_path": "/500/281/cat?random={{ fake.random_int(min=0, max=1000, step=1) }}", | |
| "genre_ids": {{ ([request.queryString.with_genres | int] + fake.random_choices(elements=[12, 28, 53, 135, 956, 2786, 10752])) | unique | list | tojson }}, | |
| "id": {{ fake.random_int(min=10000, max=50000, step=1) }}, | |
| "original_language": "{{ fake.language_code() }}", | |
| "original_title": "{{ fake.text(max_nb_chars=20)[:-1] | title }}", |
| { | |
| "page": 1, | |
| "results": [{% for n in range(range(100) | random) %} | |
| { | |
| "adult": {{ fake.boolean(chance_of_getting_true=25) | lower }}, | |
| "backdrop_path": "/500/281/cat?random={{ fake.random_int(min=0, max=1000, step=1) }}", | |
| "genre_ids": {{ ([request.queryString.with_genres | int] + fake.random_choices(elements=[12, 28, 53, 135, 956, 2786, 10752])) | unique | list | tojson }}, | |
| "id": {{ fake.random_int(min=10000, max=50000, step=1) }}, | |
| "original_language": "{{ fake.language_code() }}", | |
| "original_title": "{{ fake.text(max_nb_chars=20)[:-1] | title }}", |
| templatingEngine: "Jinja2" | |
| management: | |
| port: 8000 | |
| ssl: true | |
| services: | |
| - port: 8081 | |
| name: "Movie Database API" | |
| endpoints: | |
| - path: "/3/discover/movie" | |
| response: |
| services: | |
| - name: Kafka Mocks | |
| type: kafka | |
| address: "{{ env 'KAFKA_ADDR' 'localhost:9092' }}" | |
| actors: [] |
| { | |
| "id": {{ random.int(100000, 999999) }}, | |
| "name": "{{ jsonPath(request.json, '$.name') }}", | |
| "address": "{{ jsonPath(request.json, '$.address') }}", | |
| "phone": "{{ jsonPath(request.json, '$.phone') }}" | |
| } |
| performanceProfiles: | |
| profile1: | |
| ratio: 1 | |
| delay: 1.5 | |
| faults: | |
| '200': 0.3 | |
| '201': 0.1 | |
| '400': 0.1 | |
| '500': 0.2 | |
| '503': 0.1 |
| services: | |
| - port: 8081 | |
| endpoints: | |
| - path: "/example" | |
| response: | |
| - "response 1" | |
| - "response 2" | |
| - "response 3" |
| services: | |
| - port: 8081 | |
| endpoints: | |
| - path: /api-call | |
| response: | |
| status: "{{ request.queryString.rc }}" | |
| headers: | |
| content-type: '{{ request.headers.accept }}' | |
| x-custom-id: '{{ random.int 0 1000 }}' | |
| body: '{"result": "created", "name": "{{fake.lastname}}" }' |
| services: | |
| - port: 8081 | |
| endpoints: | |
| - path: "/example/path/{{my_variable}}/lastsegment" | |
| response: "my_variable is captured: {{my_variable}}" |