-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
54 lines (45 loc) · 1.5 KB
/
Taskfile.yml
File metadata and controls
54 lines (45 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# https://taskfile.dev/docs/guide
# https://taskfile.dev/reference/templating/
version: '3'
vars:
CLI_PATH: req_client
tasks:
default: mix test
sh: iex --erl "-kernel shell_history enabled" -S mix
fmt: mix format
test.all: mix test --include try --include external
build:
aliases: ["b"]
cmds:
- mix escript.build --force
install:
aliases: ["i"]
deps: ["build"]
cmds:
- mix escript.install {{.CLI_PATH}} --force
hex.i: mix escript.install hex req_client --force
gi: mix escript.install github cao7113/req_client --force
bench: |
url=http://localhost:4000/api/delay/1000/ms
mix run ./run/benchmark.exs $url -r 1
# [mint: 1187, req: 1187, httpc: 1233]
mix run ./run/benchmark.exs $url -r 10
# [mint: 1246, req: 1246, httpc: 1312]
mix run ./run/benchmark.exs $url -r 50
# [req: 1629, mint: 1644, httpc: 1647]
time curl $url
cacher.files: |
# req_client https://hub.docker.com/v2/namespaces/hexpm/repositories/elixir/tags\?name\=1.19.4-erlang-28.1.1-debian-trixie- --cacher -d
ls -l ~/Library/Caches/req_client
## output httpc or mint req-client code
out.hc: |
outdir=notes
mkdir -p $outdir
cat lib/req_client/channels/channel.ex lib/req_client/channels/httpc.ex > $outdir/httpc.ex
echo "# Output httpc-standalone code into $outdir/httpc.ex"
## Git ops
ops.up: mix git_ops.release --yes && git push --follow-tags
prj.info: mix git_ops.project_info
ops.init: mix git_ops.release --initial
setup: |
mix deps.get