Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use data store #13

Merged
merged 68 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
14abc0f
Move Point3 test code out of data_store crate
emilk May 31, 2022
1c090af
Add data to the log data store
emilk May 31, 2022
b22f84f
Add LogId to the data store
emilk May 31, 2022
5a11754
Improve store visiting
emilk Jun 1, 2022
fd0fdfd
Store the parent object data path in the data store
emilk Jun 1, 2022
6e5a3ea
extract 2D objects from the data store (3D to come later)
emilk Jun 1, 2022
ad687b0
Add 3D objects
emilk Jun 2, 2022
4802db9
Make color part of Object (every object has a color, at least right now)
emilk Jun 2, 2022
ef87ae5
More generic object filtering
emilk Jun 2, 2022
f59c162
Add Space info to the Objects
emilk Jun 2, 2022
5165057
Switch 2D and 3D views to using the new data store
emilk Jun 2, 2022
000bd5b
objectron fix: bbox2d and bbox3d sharing the same object path
emilk Jun 2, 2022
50cf570
Don't show visibility buttons for leafs
emilk Jun 2, 2022
f8d1778
Update changelog
emilk Jun 2, 2022
24fd510
Optimize sphere renderer AABB calculation
emilk Jun 7, 2022
bbd9e64
merge fixes (DataPath refactor)
emilk Jun 7, 2022
83d0b23
Add DataPathHash
emilk Jun 8, 2022
d4e38c5
Faster random object colors
emilk Jun 8, 2022
65d2c6d
Add batch data
emilk Jun 8, 2022
33afc98
Properly format old data
emilk Jun 8, 2022
fedbd59
Add nyud dataset explorer
emilk Jun 8, 2022
1ea61d9
Add DataBatch::Color
emilk Jun 9, 2022
a87dda0
fix tests
emilk Jun 10, 2022
f614a78
ObjectPath -> DataPath
emilk Jun 10, 2022
1ea122a
Small cleanup conserning colors
emilk Jun 11, 2022
b882f5b
Rename LogMsg -> DataMsg
emilk Jun 11, 2022
4057008
Add `enum LogMsg` with TypeMsg and DataMsg variants
emilk Jun 11, 2022
8c36939
Make TypePath a newtype
emilk Jun 11, 2022
c10c38d
Must pre-register all type paths
emilk Jun 11, 2022
2e13d12
Type check data against parent object types expected members
emilk Jun 11, 2022
743bed1
Optimize inserting data into data store by remove dependency on im
emilk Jun 11, 2022
05ec17d
Use the object types when extracting data from data store
emilk Jun 11, 2022
264c862
Make query functions generic
emilk Jun 12, 2022
0ab3088
Add Hash128 helper type
emilk Jun 12, 2022
104ef71
Separate ObjectPath from DataPath
emilk Jun 12, 2022
f939930
Remove dead code
emilk Jun 12, 2022
055fb17
Restrict what we can insert into the data store
emilk Jun 12, 2022
ba7ddf1
Remove SpaceSummary
emilk Jun 12, 2022
160b5d7
Simplify Objects by just using flat vectors
emilk Jun 12, 2022
cbe6157
Add code for partitioning Objects on space
emilk Jun 12, 2022
f67cfd9
Use the partitioned objects
emilk Jun 12, 2022
bbe5182
Remove Space from DataMsg
emilk Jun 12, 2022
5629ea2
Move center3d function
emilk Jun 13, 2022
a8a3504
type-erased queries of the data store
emilk Jun 13, 2022
3571f7f
Add ObjPath::from(&str)
emilk Jun 13, 2022
0915129
Adjust 3D colors and lighting
emilk Jun 13, 2022
307ecf7
export viewer::math
emilk Jun 13, 2022
555b00f
simplify nyud code
emilk Jun 13, 2022
44f106e
context panel: replace old message queries with the new data queries
emilk Jun 13, 2022
80b1676
Click spaces to select them
emilk Jun 13, 2022
521b9a0
Fix object properties
emilk Jun 13, 2022
517da4c
Remove center3d
emilk Jun 13, 2022
135f7a6
Rename parent_obj_path -> obj_path
emilk Jun 13, 2022
48a61c1
DataStore: fetch ObjPath when doing queries
emilk Jun 14, 2022
2f1cb9f
Optimize ObjPath by boxing innards
emilk Jun 14, 2022
19b81db
Use 64-bit hash in ObjTypePath
emilk Jun 14, 2022
f32e354
Optimize IndexKey by boxing innards
emilk Jun 14, 2022
5808196
nyud: log point colors for speed
emilk Jun 14, 2022
925ffe0
Move store queries to own file
emilk Jun 14, 2022
e5cf2c5
Fix test, add String datatype, simplify query functions
emilk Jun 14, 2022
72d6534
Add query for a specific object path
emilk Jun 14, 2022
1090f26
Picking in 2D and 3D now based on data store instead of log messages
emilk Jun 14, 2022
641666f
Store ObjPathHash in Scene instead of full ObjPath
emilk Jun 14, 2022
96b8f8e
Simplify argument to insert_batch
emilk Jun 14, 2022
00d4a64
Fix compilation of benchmark
emilk Jun 14, 2022
c446c39
Clippy fix
emilk Jun 15, 2022
45a88f4
Silence wasm32 warnings
emilk Jun 15, 2022
35ece7a
Cleanup
emilk Jun 15, 2022
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
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,25 @@
],
"cwd": "${workspaceFolder}"
},
{
"name": "Debug 'nyud'",
"type": "lldb",
"request": "launch",
"cargo": {
"args": [
"build",
"--package=nyud"
],
"filter": {
"name": "nyud",
"kind": "bin"
}
},
"args": [
"nyud/dataset/cafe.zip"
],
"cwd": "${workspaceFolder}"
},
{
"name": "Debug 'prototype' tests",
"type": "lldb",
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# rerun changelog

A crude, incomplete, reverse time-line of user-facing things added, removed and changed.
A crude and incomplete time-line of user-facing things added, removed and changed. Newest on top.

* 2022-06-15: Add support for batch logging ([#13](https://github.com/rerun-io/rerun/pull/13)).
* 2022-05-12: Click on a point to center camera on that point in the 3D view.
* 2022-05-12: Use WSAD and QE to move camera in 3D view.
* 2022-05-09: Step forward/back in time with arrow keys.
Expand Down
111 changes: 67 additions & 44 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ members = [
"comms",
"data_store",
"log_types",
"nyud",
"objectron",
"rr_string_interner",
"viewer",
Expand Down
14 changes: 8 additions & 6 deletions comms/src/server.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
use futures_util::{SinkExt, StreamExt};
use log_types::LogMsg;
use parking_lot::Mutex;
use std::sync::Arc;
use std::{net::SocketAddr, time::Duration};

use futures_util::{SinkExt, StreamExt};
use parking_lot::Mutex;
use tokio::net::{TcpListener, TcpStream};
use tokio_tungstenite::{accept_async, tungstenite::Error};

use log_types::LogMsg;

// ----------------------------------------------------------------------------

pub struct Server {
Expand Down Expand Up @@ -131,10 +133,10 @@ async fn handle_connection(
}
}
}
log_msg = log_rx.recv() => {
let log_msg = log_msg.unwrap();
data_msg = log_rx.recv() => {
let data_msg = data_msg.unwrap();

ws_sender.send(tungstenite::Message::Binary(log_msg.to_vec())).await?;
ws_sender.send(tungstenite::Message::Binary(data_msg.to_vec())).await?;
}
_ = interval.tick() => {
// ws_sender.send(Message::Text("tick".to_owned())).await?;
Expand Down
6 changes: 5 additions & 1 deletion data_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ publish = false
log_types = { path = "../log_types" }

ahash = "0.7"
im = "15"
itertools = "0.10"
nohash-hasher = "0.2"
tracing = "0.1"

# native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
puffin = { version = "0.13", optional = true }

[dev-dependencies]
criterion = "0.3"
mimalloc = "0.1"
Expand Down
Loading