Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ jobs:
bench.filename
frontend_bench:
name: Run Frontend Benchmarks
timeout-minutes: 5
timeout-minutes: 30
needs:
- build
strategy:
Expand Down
23 changes: 12 additions & 11 deletions Cargo.lock

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

16 changes: 8 additions & 8 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@ default_to_workspace = false
[tasks.poetry-export-dev]
script_runner = "@shell"
script = '''
conda run -n console_pp poetry export --dev -f $REQUIREMENTS_FILE --output $REQUIREMENTS_DEV_FILE --without-hashes
conda run -n $CONDA_ENV poetry export --dev -f $REQUIREMENTS_FILE --output $REQUIREMENTS_DEV_FILE --without-hashes
'''

[tasks.poetry-export]
dependencies = ["poetry-export-dev"]
script_runner = "@shell"
script = '''
conda run -n console_pp poetry export -f $REQUIREMENTS_FILE --output $REQUIREMENTS_FILE --without-hashes
conda run -n $CONDA_ENV poetry export -f $REQUIREMENTS_FILE --output $REQUIREMENTS_FILE --without-hashes
'''

[tasks.pip-install-dev]
script_runner = "@shell"
script = '''
conda run -n console_pp pip install -r $REQUIREMENTS_DEV_FILE
conda run -n $CONDA_ENV pip install -r $REQUIREMENTS_DEV_FILE
'''

[tasks.pip-install]
script_runner = "@shell"
script = '''
conda run -n console_pp pip install -r $REQUIREMENTS_FILE
conda run -n $CONDA_ENV pip install -r $REQUIREMENTS_FILE
'''

[tasks.generate-resources]
script_runner = "@shell"
script = '''
conda run -n $CONDA_ENV pyside2-rcc resources/console_resources.qrc -o src/main/python/console_resources.py
conda run -n $CONDA_ENV --no-capture-output --live-stream pyside2-rcc resources/console_resources.qrc -o src/main/python/console_resources.py
'''

[tasks.copy-capnp]
Expand All @@ -62,14 +62,14 @@ Get-ChildItem .\console_backend -Recurse -Include @("*.egg-info", "*.dist-info")
dependencies = ["copy-capnp", "generate-resources", "remove-egg-dist", "install-backend"]
script_runner = "@shell"
script = '''
conda run -n $CONDA_ENV fbs run
conda run -n $CONDA_ENV --no-capture-output --live-stream fbs run
'''

[tasks.prod-run]
dependencies = ["copy-capnp", "generate-resources", "remove-egg-dist", "prod-install-backend"]
script_runner = "@shell"
script = '''
conda run -n $CONDA_ENV fbs run
conda run -n $CONDA_ENV --no-capture-output --live-stream fbs run
'''

[tasks.setuptools-rust]
Expand All @@ -87,7 +87,7 @@ conda run -n $CONDA_ENV pip install -e ./console_backend
[tasks.prod-install-backend]
script_runner = "@shell"
script = '''
conda run -n $CONDA_ENV python -m pip install -t ./console_backend --upgrade --force ./console_backend -v
conda run -n $CONDA_ENV --no-capture-output --live-stream python -m pip install ./console_backend --upgrade --force ./console_backend -v
'''

[tasks.prod-freeze-no-copy]
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ brew install capnp
apt-get install capnproto
```

Setup the poetry environment
Install development dependencies (On Windows make sure you're using Adminstrator shell).

```
poetry install
cargo make pip-install-dev
git pull lfs
```

## Running
Expand Down
2 changes: 1 addition & 1 deletion console_backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2018"
[dependencies]
capnp = "0.14"
pyo3 = { version = "0.13", features = ["extension-module"] }
sbp = { git = "https://github.com/swift-nav/libsbp.git", rev = "986af3f35033a720f21872794d0bd6579c02866c" }
sbp = { git = "https://github.com/swift-nav/libsbp.git", rev = "0563350bb387e4a966a2b558adb7b05b2baf005f" }
ordered-float = "2.0"
ndarray = "0.14.0"
glob = "0.3.0"
Expand Down
13 changes: 10 additions & 3 deletions console_backend/benches/cpu_benches.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#![allow(unused_imports)]
use criterion::{criterion_group, criterion_main, Criterion};
use glob::glob;
use std::{fs, path::Path, sync::mpsc, thread, time};
use std::{
fs,
path::Path,
sync::{mpsc, Arc, Mutex},
thread, time,
};

extern crate console_backend;
use console_backend::process_messages;
use console_backend::{process_messages, types::SharedState};

const BENCH_FILEPATH: &str = "./tests/data/piksi-relay.sbp";
const BENCHMARK_TIME_LIMIT: u64 = 10000;
Expand Down Expand Up @@ -48,7 +53,9 @@ fn run_process_messages(file_in_name: &str, failure: bool) {
thread::sleep(time::Duration::from_millis(FAILURE_CASE_SLEEP_MILLIS));
}
let messages = sbp::iter_messages(Box::new(fs::File::open(file_in_name).unwrap()));
process_messages::process_messages(messages, client_send);
let shared_state = SharedState::new();
let shared_state = Arc::new(Mutex::new(shared_state));
process_messages::process_messages(messages, &shared_state, client_send);
}
recv_thread.join().expect("join should succeed");
}
Expand Down
2 changes: 1 addition & 1 deletion console_backend/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_py_version_cfgs():


def make_rust_extension(module_name):
return RustExtension(module_name, "Cargo.toml", rustc_flags=get_py_version_cfgs(), debug=True)
return RustExtension(module_name, "Cargo.toml", rustc_flags=get_py_version_cfgs())


setup(
Expand Down
Loading