https://github.com/bloodielie/perf
python/js performance
https://github.com/bloodielie/perf
asyncio javascript js node nodejs perf python
Last synced: 3 months ago
JSON representation
python/js performance
- Host: GitHub
- URL: https://github.com/bloodielie/perf
- Owner: Bloodielie
- Created: 2020-08-30T12:35:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-07T18:33:12.000Z (almost 6 years ago)
- Last Synced: 2025-04-04T12:28:43.455Z (over 1 year ago)
- Topics: asyncio, javascript, js, node, nodejs, perf, python
- Language: Python
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python/Js web perf
## Preparation postgres
```bash
CREATE TABLE _bytes(b bytea); INSERT INTO _bytes(b) (SELECT repeat('a', 1000)::bytea FROM generate_series(1, 100));
CREATE TABLE _test(a int[]); INSERT INTO _test(a) (SELECT (SELECT array_agg(i) FROM generate_series(1, 100) as s(i)) FROM generate_series(1, 100));
```
## Apache-benchmark testing
```bash
ab -n 100000 -c 1000 http://127.0.0.1:8000/{json/fib/fact/db_bytes/db_test}
```
## Js run
```bash
pm2-runtime ecosystem.config.js
```
## Python run
```bash
bash
```
## Result in my computer

## Database drivers
+ python
+ [asyncpg](https://github.com/MagicStack/asyncpg)
+ [aiopg](https://github.com/aio-libs/aiopg)
+ node.js
+ [node-postgres](https://github.com/brianc/node-postgres)