@@ -18,6 +18,67 @@ defaults:
18
18
shell : bash
19
19
20
20
jobs :
21
+
22
+ benchmark_binary__ :
23
+ name : Benchmark Binary
24
+ runs-on : ubuntu-22.04
25
+ permissions :
26
+ contents : read
27
+
28
+ steps :
29
+ - name : Checkout To Ockam Repository
30
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
31
+
32
+ - name : Install Nix
33
+ uses : ./.github/actions/nix_installer_and_cache
34
+ with :
35
+ cache-unique-id : ' nix-installer'
36
+
37
+ - name : Install TCP Test Tool And Ockam Binary
38
+ shell : nix develop ./tools/nix#rust --command bash {0}
39
+ run : |
40
+ cargo build --release --bin tcp-test
41
+ curl -LO "https://downloads.ockam.io/command/v0.149.0/ockam.x86_64-unknown-linux-gnu"
42
+
43
+ mv ockam.x86_64-unknown-linux-gnu ockam
44
+ chmod +x ockam
45
+ sudo mv ockam /usr/bin
46
+ sudo mv ./target/release/tcp-test /usr/bin
47
+
48
+ sudo apt update
49
+ sudo apt tmux
50
+
51
+ - name : Run Benchmark And Fail If Cap Is Not Hit
52
+ run : |
53
+ tmux new-session -d -s echo_server 'tcp-test echo 40000; exec bash'
54
+ tmux new-session -d -s null_server 'tcp-test null 50000; exec bash'
55
+ sleep 5
56
+
57
+ ockam node create "
58
+ name: server
59
+ tcp-outlets:
60
+ echo_outlet:
61
+ to: 127.0.0.1:40000
62
+ null_outlet:
63
+ to: 127.0.0.1:50000
64
+ "
65
+
66
+ ockam node create "
67
+ name: client
68
+ tcp-inlets:
69
+ echo_inlet:
70
+ from: 127.0.0.1:40001
71
+ to: /node/server/secure/api/service/echo_outlet
72
+ null_outlet:
73
+ from: 127.0.0.1:50001
74
+ to: /node/server/secure/api/service/null_outlet
75
+ "
76
+
77
+ tcp-test latency 127.0.0.1:40001
78
+ tcp-test throughput --seconds 10 127.0.0.1:50001
79
+
80
+ exit 1
81
+
21
82
create_release :
22
83
permissions :
23
84
contents : write
@@ -453,3 +514,62 @@ jobs:
453
514
bucket_name : ${{ env.BUCKET_NAME }}
454
515
file_name : sha256sums.txt.sig
455
516
release_version : " v${{ needs.create_release.outputs.version }}"
517
+
518
+ benchmark_binary :
519
+ name : Benchmark Binary
520
+ needs : [create_release, sign_release]
521
+ runs-on : ubuntu-22.04
522
+ permissions :
523
+ contents : read
524
+
525
+ steps :
526
+ - name : Checkout To Ockam Repository
527
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
528
+
529
+ - name : Install Nix
530
+ uses : ./.github/actions/nix_installer_and_cache
531
+ with :
532
+ cache-unique-id : ' nix-installer'
533
+
534
+ - name : Install TCP Test Tool And Ockam Binary
535
+ shell : nix develop ./tools/nix#rust
536
+ run : |
537
+ cargo build --release --bin tcp-test
538
+ curl -LO "https://downloads.ockam.io/command/v${{ needs.create_release.outputs.version }}/ockam.x86_64-unknown-linux-gnu"
539
+
540
+ mv ockam.x86_64-unknown-linux-gnu ockam
541
+ chmod +x ockam
542
+ mv ockam /usr/bin
543
+ mv ./target/release/tcp-test /usr/bin
544
+
545
+ sudo apt update
546
+ sudo apt tmux
547
+
548
+ - name : Run Benchmark And Fail If Cap Is Not Hit
549
+ run : |
550
+ tmux new-session -d -s echo_server 'tcp-test echo 40000; exec bash'
551
+ tmux new-session -d -s null_server 'tcp-test null 50000; exec bash'
552
+ sleep 5
553
+
554
+ ockam node create "
555
+ name: server
556
+ tcp-outlets:
557
+ echo_outlet:
558
+ to: 127.0.0.1:40000
559
+ null_outlet:
560
+ to: 127.0.0.1:50000
561
+ "
562
+
563
+ ockam node create "
564
+ name: client
565
+ tcp-inlets:
566
+ echo_inlet:
567
+ from: 127.0.0.1:40001
568
+ to: /node/server/secure/api/service/echo_outlet
569
+ null_outlet:
570
+ from: 127.0.0.1:50001
571
+ to: /node/server/secure/api/service/null_outlet
572
+ "
573
+
574
+ tcp-test latency 127.0.0.1:40001
575
+ tcp-test throughput --seconds 10 127.0.0.1:50001
0 commit comments