Skip to content

Commit

Permalink
WIP: Oximeter query language
Browse files Browse the repository at this point in the history
- Basic query grammar
- Started shell sketch
- Adding timeseries and transformation implementations
  • Loading branch information
bnaecker committed Feb 14, 2024
1 parent e1c3dd7 commit 1e2dba3
Show file tree
Hide file tree
Showing 13 changed files with 1,988 additions and 497 deletions.
61 changes: 61 additions & 0 deletions Cargo.lock

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

90 changes: 7 additions & 83 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ backoff = { version = "0.4.0", features = [ "tokio" ] }
base64 = "0.21.7"
bb8 = "0.8.3"
bcs = "0.1.6"
bincode = "1.3.3"
bootstore = { path = "bootstore" }
bootstrap-agent-client = { path = "clients/bootstrap-agent-client" }
buf-list = { version = "1.0.3", features = ["tokio1"] }
Expand Down Expand Up @@ -251,23 +250,23 @@ mockall = "0.12"
newtype_derive = "0.1.6"
mg-admin-client = { path = "clients/mg-admin-client" }
multimap = "0.8.1"
ndarray = { version = "0.15.6", default-features = false, features = ["std", "rayon", "serde"] }
nexus-blueprint-execution = { path = "nexus/blueprint-execution" }
nexus-client = { path = "clients/nexus-client" }
nexus-db-model = { path = "nexus/db-model" }
nexus-db-queries = { path = "nexus/db-queries" }
nexus-defaults = { path = "nexus/defaults" }
nexus-deployment = { path = "nexus/deployment" }
nexus-inventory = { path = "nexus/inventory" }
omicron-certificates = { path = "certificates" }
omicron-passwords = { path = "passwords" }
omicron-workspace-hack = "0.1.0"
oxlog = { path = "dev-tools/oxlog" }
nexus-test-interface = { path = "nexus/test-interface" }
nexus-test-utils-macros = { path = "nexus/test-utils-macros" }
nexus-test-utils = { path = "nexus/test-utils" }
nexus-types = { path = "nexus/types" }
num-integer = "0.1.45"
num = { version = "0.4.1", default-features = false, features = [ "libm" ] }
omicron-certificates = { path = "certificates" }
omicron-passwords = { path = "passwords" }
omicron-workspace-hack = "0.1.0"
omicron-common = { path = "common" }
omicron-gateway = { path = "gateway" }
omicron-nexus = { path = "nexus" }
Expand All @@ -278,13 +277,13 @@ omicron-test-utils = { path = "test-utils" }
omicron-zone-package = "0.11.0"
oxide-client = { path = "clients/oxide-client" }
oxide-vpc = { git = "https://github.com/oxidecomputer/opte", rev = "1d29ef60a18179babfb44f0f7a3c2fe71034a2c1", features = [ "api", "std" ] }
oxlog = { path = "dev-tools/oxlog" }
once_cell = "1.19.0"
openapi-lint = { git = "https://github.com/oxidecomputer/openapi-lint", branch = "main" }
openapiv3 = "2.0.0"
# must match samael's crate!
openssl = "0.10"
openssl-sys = "0.9"
openssl-probe = "0.1.5"
opte-ioctl = { git = "https://github.com/oxidecomputer/opte", rev = "1d29ef60a18179babfb44f0f7a3c2fe71034a2c1" }
oso = "0.27"
owo-colors = "4.0.0"
Expand All @@ -300,10 +299,9 @@ parse-display = "0.9.0"
partial-io = { version = "0.5.4", features = ["proptest1", "tokio1"] }
parse-size = "1.0.0"
paste = "1.0.14"
percent-encoding = "2.3.1"
peg = "0.8.2"
pem = "3.0"
petgraph = "0.6.4"
postgres-protocol = "0.6.6"
predicates = "3.1.0"
pretty_assertions = "1.4.0"
pretty-hex = "0.4.1"
Expand Down Expand Up @@ -363,9 +361,8 @@ slog-error-chain = { git = "https://github.com/oxidecomputer/slog-error-chain",
slog-term = "2.9"
smf = "0.2"
sp-sim = { path = "sp-sim" }
sprockets-common = { git = "http://github.com/oxidecomputer/sprockets", rev = "77df31efa5619d0767ffc837ef7468101608aee9" }
sprockets-host = { git = "http://github.com/oxidecomputer/sprockets", rev = "77df31efa5619d0767ffc837ef7468101608aee9" }
sprockets-rot = { git = "http://github.com/oxidecomputer/sprockets", rev = "77df31efa5619d0767ffc837ef7468101608aee9" }
sqlformat = "0.2.3"
sqlparser = { version = "0.43.1", features = [ "visitor" ] }
static_assertions = "1.1.0"
# Please do not change the Steno version to a Git dependency. It makes it
Expand Down Expand Up @@ -438,23 +435,12 @@ debug = "line-tables-only"
# times, because it allows target and host dependencies to be unified.
debug = "line-tables-only"

# `bindgen` is used by `samael`'s build script; building it with optimizations
# makes that build script run ~5x faster, more than offsetting the additional
# build time added to `bindgen` itself.
[profile.dev.package.bindgen]
opt-level = 3

# `lalrpop` is used by `polar-core`'s build script; building it with
# optimizations makes that build script run ~20x faster, more than offsetting
# the additional build time added to `lalrpop` itself.
[profile.dev.package.lalrpop]
opt-level = 3

# `polar-core` is exercised heavily during the test suite and it's worthwhile to
# have it built with optimizations.
[profile.dev.package.polar-core]
opt-level = 3

# Password hashing is expensive by construction. Build the hashing libraries
# with optimizations to significantly speed up tests.
[profile.dev.package.argon2]
Expand All @@ -481,46 +467,12 @@ opt-level = 3
opt-level = 3
[profile.dev.package.chacha20poly1305]
opt-level = 3
[profile.dev.package.chacha20]
opt-level = 3
[profile.dev.package.vsss-rs]
opt-level = 3
[profile.dev.package.curve25519-dalek]
opt-level = 3
[profile.dev.package.aead]
opt-level = 3
[profile.dev.package.aes]
opt-level = 3
[profile.dev.package.aes-gcm]
opt-level = 3
[profile.dev.package.bcrypt-pbkdf]
opt-level = 3
[profile.dev.package.blake2]
opt-level = 3
[profile.dev.package.blake2b_simd]
opt-level = 3
[profile.dev.package.block-buffer]
opt-level = 3
[profile.dev.package.block-padding]
opt-level = 3
[profile.dev.package.blowfish]
opt-level = 3
[profile.dev.package.constant_time_eq]
opt-level = 3
[profile.dev.package.crypto-bigint]
opt-level = 3
[profile.dev.package.crypto-common]
opt-level = 3
[profile.dev.package.ctr]
opt-level = 3
[profile.dev.package.cbc]
opt-level = 3
[profile.dev.package.digest]
opt-level = 3
[profile.dev.package.ed25519]
opt-level = 3
[profile.dev.package.ed25519-dalek]
opt-level = 3
[profile.dev.package.elliptic-curve]
opt-level = 3
[profile.dev.package.generic-array]
Expand All @@ -529,48 +481,20 @@ opt-level = 3
opt-level = 3
[profile.dev.package.hmac]
opt-level = 3
[profile.dev.package.lpc55_sign]
opt-level = 3
[profile.dev.package.md5]
opt-level = 3
[profile.dev.package.md-5]
opt-level = 3
[profile.dev.package.num-bigint]
opt-level = 3
[profile.dev.package.num-bigint-dig]
opt-level = 3
[profile.dev.package.rand]
opt-level = 3
[profile.dev.package.rand_chacha]
opt-level = 3
[profile.dev.package.rand_core]
opt-level = 3
[profile.dev.package.rand_hc]
opt-level = 3
[profile.dev.package.rand_xorshift]
opt-level = 3
[profile.dev.package.rsa]
opt-level = 3
[profile.dev.package.salty]
opt-level = 3
[profile.dev.package.signature]
opt-level = 3
[profile.dev.package.subtle]
opt-level = 3
[profile.dev.package.tiny-keccak]
opt-level = 3
[profile.dev.package.uuid]
opt-level = 3
[profile.dev.package.cipher]
opt-level = 3
[profile.dev.package.cpufeatures]
opt-level = 3
[profile.dev.package.poly1305]
opt-level = 3
[profile.dev.package.inout]
opt-level = 3
[profile.dev.package.keccak]
opt-level = 3

#
# It's common during development to use a local copy of various complex
Expand Down
52 changes: 46 additions & 6 deletions oximeter/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,15 @@ clap.workspace = true
dropshot.workspace = true
futures.workspace = true
highway.workspace = true
indexmap.workspace = true
omicron-common.workspace = true
omicron-workspace-hack.workspace = true
oximeter.workspace = true
reedline.workspace = true
regex.workspace = true
rustyline.workspace = true
serde.workspace = true
serde_json.workspace = true
slog.workspace = true
slog-async.workspace = true
slog-term.workspace = true
sqlparser.workspace = true
sqlformat = "0.2.3"
tabled.workspace = true
thiserror.workspace = true
usdt.workspace = true
uuid.workspace = true
Expand All @@ -38,26 +32,72 @@ uuid.workspace = true
workspace = true
features = [ "serde" ]

[dependencies.indexmap]
workspace = true
optional = true

[dependencies.ndarray]
workspace = true
optional = true

[dependencies.peg]
workspace = true
optional = true

[dependencies.reedline]
workspace = true
optional = true

[dependencies.reqwest]
workspace = true
features = [ "json" ]

[dependencies.rustyline]
workspace = true
optional = true

[dependencies.schemars]
workspace = true
features = [ "uuid1", "bytes", "chrono" ]

[dependencies.sqlformat]
workspace = true
optional = true

[dependencies.sqlparser]
workspace = true
optional = true

[dependencies.tokio]
workspace = true
features = [ "rt-multi-thread", "macros" ]

[dependencies.tabled]
workspace = true
optional = true

[dev-dependencies]
expectorate.workspace = true
indexmap.workspace = true
itertools.workspace = true
omicron-test-utils.workspace = true
slog-dtrace.workspace = true
sqlparser.workspace = true
strum.workspace = true
tempfile.workspace = true

[features]
default = [ "oxql" ]
sql = [
"dep:indexmap",
"dep:reedline",
"dep:rustyline",
"dep:sqlformat",
"dep:sqlparser",
"dep:tabled"
]
oxql = [ "dep:ndarray", "dep:peg", "dep:reedline", "dep:tabled" ]

[[bin]]
name = "oxdb"
doc = false
Loading

0 comments on commit 1e2dba3

Please sign in to comment.