https://github.com/ttytm/haskell-async-requests-example
Example in Haskell that focuses on concurrent async requests.
https://github.com/ttytm/haskell-async-requests-example
Last synced: about 1 year ago
JSON representation
Example in Haskell that focuses on concurrent async requests.
- Host: GitHub
- URL: https://github.com/ttytm/haskell-async-requests-example
- Owner: ttytm
- License: mit
- Created: 2023-03-01T16:20:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T16:22:06.000Z (over 3 years ago)
- Last Synced: 2025-03-28T19:11:50.144Z (about 1 year ago)
- Language: Haskell
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Haskell-async-requests-example
Example in haskell that focuses on concurrent async requests.
## Test runs
```
--------------------------------------------------------------------------------
1: Time 5.78s. Sent: 100. Successes: 94. Errors: 0. Timeouts: 6. Transferred: 25.21 (4.36 MB/s)
2: Time 5.11s. Sent: 100. Successes: 94. Errors: 0. Timeouts: 6. Transferred: 25.23 (4.94 MB/s)
3: Time 5.15s. Sent: 100. Successes: 94. Errors: 0. Timeouts: 6. Transferred: 25.20 (4.90 MB/s)
4: Time 5.10s. Sent: 100. Successes: 94. Errors: 0. Timeouts: 6. Transferred: 25.20 (4.94 MB/s)
5: Time 5.11s. Sent: 100. Successes: 94. Errors: 0. Timeouts: 6. Transferred: 25.10 (4.91 MB/s)
6: Time 5.12s. Sent: 100. Successes: 94. Errors: 0. Timeouts: 6. Transferred: 24.78 (4.84 MB/s)
7: Time 5.18s. Sent: 100. Successes: 94. Errors: 0. Timeouts: 6. Transferred: 25.22 (4.87 MB/s)
8: Time 5.09s. Sent: 100. Successes: 94. Errors: 0. Timeouts: 6. Transferred: 25.11 (4.93 MB/s)
9: Time 5.14s. Sent: 100. Successes: 94. Errors: 0. Timeouts: 6. Transferred: 25.39 (4.94 MB/s)
10: Time 5.11s. Sent: 100. Successes: 94. Errors: 0. Timeouts: 6. Transferred: 25.14 (4.92 MB/s)
--------------------------------------------------------------------------------
Runs: 10. Average Time: 5.19s. Total Errors: 0. Total Timeouts: 60. Transferred: 251.58 MB (4.85 MB/s).
--------------------------------------------------------------------------------
```
---
Single source requests (for simplicity `google.com/search?q=<1..100>`)
```
Runs: 10. Average Time: 1.31s. Total Errors: 0. Total Timeouts: 0. Transferred: 106.26 MB (7.95 MB/s).
```
---
Supplementary information:
- The requests were sent from Germany
- The timeout was set to 5s as using 10s would result in the same number of timeouts per run
- Context: In current state of the related Nim example, setting a timeout below 10s significantly increases the number of timeouts
## Equivalents in other languages
- Nim: https://github.com/tobealive/nim-async-requests-example
- Python: https://github.com/tobealive/python-async-requests-example