Skip to content

Commit 970732c

Browse files
[CPP-36]Signals Tab Rough Draft (#21)
* Signals Tab. * Keep working. * Fixed zigzag issue. * Better formatting and cleaning up signals plot. * Fixed zigzag issue. * Working draft of PR. * Bumping up macos bench time. * Respond to review requests. * Work in progress shared state. * Manually merge in #22 * Fixed measurement state vs obs msg display issue, legend fixed offset, lineseries smaller width, uprevved sbp.
1 parent 25e76b1 commit 970732c

File tree

22 files changed

+1861
-331
lines changed

22 files changed

+1861
-331
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ jobs:
252252
bench.filename
253253
frontend_bench:
254254
name: Run Frontend Benchmarks
255-
timeout-minutes: 5
255+
timeout-minutes: 30
256256
needs:
257257
- build
258258
strategy:

Cargo.lock

Lines changed: 12 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@ default_to_workspace = false
1010
[tasks.poetry-export-dev]
1111
script_runner = "@shell"
1212
script = '''
13-
conda run -n console_pp poetry export --dev -f $REQUIREMENTS_FILE --output $REQUIREMENTS_DEV_FILE --without-hashes
13+
conda run -n $CONDA_ENV poetry export --dev -f $REQUIREMENTS_FILE --output $REQUIREMENTS_DEV_FILE --without-hashes
1414
'''
1515

1616
[tasks.poetry-export]
1717
dependencies = ["poetry-export-dev"]
1818
script_runner = "@shell"
1919
script = '''
20-
conda run -n console_pp poetry export -f $REQUIREMENTS_FILE --output $REQUIREMENTS_FILE --without-hashes
20+
conda run -n $CONDA_ENV poetry export -f $REQUIREMENTS_FILE --output $REQUIREMENTS_FILE --without-hashes
2121
'''
2222

2323
[tasks.pip-install-dev]
2424
script_runner = "@shell"
2525
script = '''
26-
conda run -n console_pp pip install -r $REQUIREMENTS_DEV_FILE
26+
conda run -n $CONDA_ENV pip install -r $REQUIREMENTS_DEV_FILE
2727
'''
2828

2929
[tasks.pip-install]
3030
script_runner = "@shell"
3131
script = '''
32-
conda run -n console_pp pip install -r $REQUIREMENTS_FILE
32+
conda run -n $CONDA_ENV pip install -r $REQUIREMENTS_FILE
3333
'''
3434

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

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

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

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

9393
[tasks.prod-freeze-no-copy]

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ brew install capnp
3333
apt-get install capnproto
3434
```
3535

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

3838
```
39-
poetry install
39+
cargo make pip-install-dev
40+
git pull lfs
4041
```
4142

4243
## Running

console_backend/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ edition = "2018"
88
[dependencies]
99
capnp = "0.14"
1010
pyo3 = { version = "0.13", features = ["extension-module"] }
11-
sbp = { git = "https://github.com/swift-nav/libsbp.git", rev = "986af3f35033a720f21872794d0bd6579c02866c" }
11+
sbp = { git = "https://github.com/swift-nav/libsbp.git", rev = "0563350bb387e4a966a2b558adb7b05b2baf005f" }
1212
ordered-float = "2.0"
1313
ndarray = "0.14.0"
1414
glob = "0.3.0"

console_backend/benches/cpu_benches.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#![allow(unused_imports)]
22
use criterion::{criterion_group, criterion_main, Criterion};
33
use glob::glob;
4-
use std::{fs, path::Path, sync::mpsc, thread, time};
4+
use std::{
5+
fs,
6+
path::Path,
7+
sync::{mpsc, Arc, Mutex},
8+
thread, time,
9+
};
510

611
extern crate console_backend;
7-
use console_backend::process_messages;
12+
use console_backend::{process_messages, types::SharedState};
813

914
const BENCH_FILEPATH: &str = "./tests/data/piksi-relay.sbp";
1015
const BENCHMARK_TIME_LIMIT: u64 = 10000;
@@ -48,7 +53,9 @@ fn run_process_messages(file_in_name: &str, failure: bool) {
4853
thread::sleep(time::Duration::from_millis(FAILURE_CASE_SLEEP_MILLIS));
4954
}
5055
let messages = sbp::iter_messages(Box::new(fs::File::open(file_in_name).unwrap()));
51-
process_messages::process_messages(messages, client_send);
56+
let shared_state = SharedState::new();
57+
let shared_state = Arc::new(Mutex::new(shared_state));
58+
process_messages::process_messages(messages, &shared_state, client_send);
5259
}
5360
recv_thread.join().expect("join should succeed");
5461
}

console_backend/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def get_py_version_cfgs():
2020

2121

2222
def make_rust_extension(module_name):
23-
return RustExtension(module_name, "Cargo.toml", rustc_flags=get_py_version_cfgs(), debug=True)
23+
return RustExtension(module_name, "Cargo.toml", rustc_flags=get_py_version_cfgs())
2424

2525

2626
setup(

0 commit comments

Comments
 (0)