Skip to content

Commit

Permalink
Merge pull request #130 from Totodore/chore-bench
Browse files Browse the repository at this point in the history
bench(socketio): add packet encode/decode benchmarks
  • Loading branch information
Totodore authored Oct 29, 2023
2 parents 8ab87bc + 6100d61 commit ab4d830
Show file tree
Hide file tree
Showing 8 changed files with 828 additions and 82 deletions.
37 changes: 30 additions & 7 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: CI

on:
push:
branches:
- main
tags:
- v*
pull_request:
Expand Down Expand Up @@ -34,8 +36,8 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-test
- run: cargo test --all-features
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo test --tests --all-features

rust-clippy-analyze:
name: Run rust-clippy analyzing
Expand Down Expand Up @@ -83,6 +85,7 @@ jobs:

engine_io:
runs-on: ubuntu-latest
needs: [test]
strategy:
matrix:
engineio-version: [v3, v4]
Expand Down Expand Up @@ -112,8 +115,8 @@ jobs:
- name: Install deps & run tests
run: |
cd engine.io-protocol/test-suite && npm install && cd ../..
cargo build --bin engineioxide-e2e --release --features ${{ matrix.engineio-version }}
cargo run --bin engineioxide-e2e --release --features ${{ matrix.engineio-version }} > server.txt & npm --prefix engine.io-protocol/test-suite test > client.txt
cargo build --bin engineioxide-e2e --features ${{ matrix.engineio-version }} --release
cargo run --bin engineioxide-e2e --features ${{ matrix.engineio-version }} --release > server.txt & npm --prefix engine.io-protocol/test-suite test > client.txt
- name: Server output
if: always()
run: cat server.txt
Expand All @@ -123,6 +126,7 @@ jobs:

socket_io:
runs-on: ubuntu-latest
needs: [test]
strategy:
matrix:
socketio-version: [v4, v5]
Expand Down Expand Up @@ -151,11 +155,30 @@ jobs:
- name: Install deps & run tests
run: |
cd socket.io-protocol/test-suite && npm install && cd ../..
cargo build --bin socketioxide-e2e --release --features ${{ matrix.socketio-version }}
cargo run --bin socketioxide-e2e --release --features ${{ matrix.socketio-version }} > server.txt & npm --prefix socket.io-protocol/test-suite test > client.txt
cargo build --bin socketioxide-e2e --features ${{ matrix.socketio-version }} --release
cargo run --bin socketioxide-e2e --features ${{ matrix.socketio-version }} --release > server.txt & npm --prefix socket.io-protocol/test-suite test > client.txt
- name: Server output
if: always()
run: cat server.txt
- name: Client output
if: always()
run: cat client.txt
run: cat client.txt

doctest:
runs-on: ubuntu-latest
needs: [engine_io, socket_io, test]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo test --doc --all-features
Loading

0 comments on commit ab4d830

Please sign in to comment.