Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ jobs:
name: Criterion Report
path: target/criterion/

setup-docker-compose:
runs-on: ubuntu-22.04
steps:
- name: checkout ${{ github.base_ref }}
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: setup environment
uses: ./.github/actions/setup

- name: build and run docker containers
run: |
docker-compose -f ./docker-compose.yml up -d
working-directory: ./benchmark

k6:
name: k6
env:
Expand Down
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = ["bin/*", "libs/*", "plugins/*"]
members = [ "benchmark/server","bin/*", "libs/*", "plugins/*"]
exclude = ["bin/npm", "tests/test-server", "tools/panic_free_analyzer"]

[workspace.dependencies]
Expand Down
31 changes: 31 additions & 0 deletions benchmark/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: '3.8'

services:
conductor:
image: conductor-image:latest
build: bin/conductor/docker/Dockerfile
ports:
- "9000:9000"
networks:
- benchmark-network
deploy:
resources:
limits:
cpus: '1.5'
memory: 1GB

source:
build: benchmark/server/Dockerfile
ports:
- "8080:8080"
networks:
- benchmark-network
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M

networks:
benchmark-network:
driver: bridge
9 changes: 9 additions & 0 deletions benchmark/server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "server"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
actix-web = "4.4.1"
10 changes: 10 additions & 0 deletions benchmark/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM rust:1.75.0 as builder

WORKDIR /usr/src/conductor-source

COPY . .
RUN cargo install --path .

FROM debian:buster-slim
COPY --from=builder /usr/local/cargo/bin/actix_hello_server /usr/local/bin/actix_hello_server
CMD ["server"]
13 changes: 13 additions & 0 deletions benchmark/server/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use actix_web::{web, App, HttpResponse, HttpServer, Responder};

async fn hello() -> impl Responder {
HttpResponse::Ok().body("Hello!")
}

#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| App::new().route("/hello", web::get().to(hello)))
.bind("0.0.0.0:8080")?
.run()
.await
}