-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
5,677 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/target | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
.pytest_cache/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
.venv/ | ||
env/ | ||
bin/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
include/ | ||
man/ | ||
venv/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
pip-selfcheck.json | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
|
||
# Rope | ||
.ropeproject | ||
|
||
# Django stuff: | ||
*.log | ||
*.pot | ||
|
||
.DS_Store | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyCharm | ||
.idea/ | ||
|
||
# VSCode | ||
.vscode/ | ||
|
||
# Pyenv | ||
.python-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
nodes: | ||
- id: sender | ||
build: cargo build --manifest-path ./sender/Cargo.toml --release | ||
path: ./sender/target/release/dora-benchmark-sender | ||
outputs: | ||
- latency | ||
- throughput | ||
|
||
- id: receiver | ||
build: cargo build --manifest-path ./receiver/Cargo.toml --release | ||
path: ./receiver/target/release/dora-benchmark-receiver | ||
inputs: | ||
latency: sender/latency | ||
throughput: sender/throughput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
use std::path::Path; | ||
|
||
use eyre::{Context, Result}; | ||
|
||
fn main() -> Result<()> { | ||
let root = Path::new(env!("CARGO_MANIFEST_DIR")); | ||
std::env::set_current_dir(root.join(file!()).parent().unwrap()) | ||
.wrap_err("failed to set working dir")?; | ||
|
||
let dataflow = Path::new("dataflow.yml"); | ||
|
||
destroy_dora()?; | ||
spawn_dora()?; | ||
build_dataflow(dataflow)?; | ||
start_dataflow(dataflow)?; | ||
|
||
Ok(()) | ||
} | ||
|
||
fn destroy_dora() -> eyre::Result<()> { | ||
let cargo = std::env::var("CARGO_HOME").unwrap(); | ||
let dora = Path::new(&cargo).join("bin").join("dora"); | ||
|
||
let mut cmd = std::process::Command::new(&dora); | ||
|
||
cmd.arg("destroy"); | ||
|
||
if cmd.status().wrap_err("failed to destroy dora")?.success() { | ||
println!("dora destroyed successfully"); | ||
} else { | ||
println!("dora destroy failed"); | ||
} | ||
|
||
Ok(()) | ||
} | ||
|
||
fn spawn_dora() -> eyre::Result<()> { | ||
let cargo = std::env::var("CARGO_HOME").unwrap(); | ||
let dora = Path::new(&cargo).join("bin").join("dora"); | ||
|
||
let mut cmd = std::process::Command::new(&dora); | ||
|
||
cmd.arg("up"); | ||
|
||
if cmd.status().wrap_err("failed to spawn dora")?.success() { | ||
println!("dora spawned successfully"); | ||
} else { | ||
println!("dora spawn failed"); | ||
} | ||
|
||
Ok(()) | ||
} | ||
|
||
fn build_dataflow(dataflow: &Path) -> eyre::Result<()> { | ||
let cargo = std::env::var("CARGO_HOME").unwrap(); | ||
let dora = Path::new(&cargo).join("bin").join("dora"); | ||
|
||
let mut cmd = std::process::Command::new(&dora); | ||
|
||
cmd.arg("build"); | ||
cmd.arg("--").arg(dataflow); | ||
|
||
if cmd.status().wrap_err("failed to build dataflow")?.success() { | ||
println!("dataflow built successfully"); | ||
} else { | ||
println!("dataflow build failed"); | ||
} | ||
|
||
Ok(()) | ||
} | ||
|
||
fn start_dataflow(dataflow: &Path) -> eyre::Result<()> { | ||
let cargo = std::env::var("CARGO_HOME").unwrap(); | ||
let dora = Path::new(&cargo).join("bin").join("dora"); | ||
|
||
let mut cmd = std::process::Command::new(&dora); | ||
|
||
cmd.arg("start"); | ||
cmd.arg("--").arg(dataflow); | ||
|
||
if cmd.status().wrap_err("failed to start dataflow")?.success() { | ||
println!("dataflow executed successfully"); | ||
} else { | ||
println!("dataflow failed"); | ||
} | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/target | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
.pytest_cache/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
.venv/ | ||
env/ | ||
bin/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
include/ | ||
man/ | ||
venv/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
pip-selfcheck.json | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
|
||
# Rope | ||
.ropeproject | ||
|
||
# Django stuff: | ||
*.log | ||
*.pot | ||
|
||
.DS_Store | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyCharm | ||
.idea/ | ||
|
||
# VSCode | ||
.vscode/ | ||
|
||
# Pyenv | ||
.python-version |
Oops, something went wrong.