diff --git a/Cargo.lock b/Cargo.lock index cc56da4..f37006f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -303,7 +303,7 @@ dependencies = [ "arrow-schema", "chrono", "half", - "indexmap 2.13.0", + "indexmap 2.13.1", "lexical-core", "num", "serde", @@ -383,7 +383,7 @@ dependencies = [ "anyhow", "chrono", "clap 4.6.0", - "indexmap 2.13.0", + "indexmap 2.13.1", "pretty_assertions", "promql-parser", "promql_utilities", @@ -399,6 +399,26 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "asap_sketchlib" +version = "0.1.0" +source = "git+https://github.com/ProjectASAP/asap_sketchlib#2442d95ef8bc8470f9909728fadc72b5e082139d" +dependencies = [ + "bytes", + "clap 4.6.0", + "core_affinity", + "crossbeam-channel", + "pcap", + "prost", + "prost-build", + "rand 0.9.2", + "rmp-serde", + "serde", + "serde-big-array", + "smallvec", + "twox-hash 2.1.2", +] + [[package]] name = "async-compression" version = "0.4.19" @@ -495,7 +515,7 @@ dependencies = [ "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.8.1", + "hyper 1.9.0", "hyper-util", "itoa", "matchit", @@ -701,9 +721,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.58" +version = "1.2.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e928d4b69e3077709075a938a05ffbedfa53a84c8f766efbf8220bb1ff60e1" +checksum = "b7a4d3ec6524d28a329fc53654bbadc9bdd7b0431f5d65f1a56ffb28a1ee5283" dependencies = [ "find-msvc-tools", "jobserver", @@ -723,7 +743,7 @@ version = "0.13.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fe45e18904af7af10e4312df7c97251e98af98c70f42f1f2587aecfcbee56bf" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.13.1", "lazy_static", "num-traits", "regex", @@ -917,6 +937,17 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core_affinity" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a034b3a7b624016c6e13f5df875747cc25f884156aad2abd12b6c46797971342" +dependencies = [ + "libc", + "num_cpus", + "winapi", +] + [[package]] name = "cpufeatures" version = "0.2.17" @@ -1084,7 +1115,7 @@ checksum = "b0f4697d190a142477b16aef7da8a99bfdc41e7e8b1687583c0d23a79c7afc1e" dependencies = [ "cc", "codespan-reporting", - "indexmap 2.13.0", + "indexmap 2.13.1", "proc-macro2", "quote", "scratch", @@ -1099,7 +1130,7 @@ checksum = "d0956799fa8678d4c50eed028f2de1c0552ae183c76e976cf7ca8c4e36a7c328" dependencies = [ "clap 4.6.0", "codespan-reporting", - "indexmap 2.13.0", + "indexmap 2.13.1", "proc-macro2", "quote", "syn 2.0.117", @@ -1117,7 +1148,7 @@ version = "1.0.194" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6acc6b5822b9526adfb4fc377b67128fdd60aac757cc4a741a6278603f763cf" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.13.1", "proc-macro2", "quote", "syn 2.0.117", @@ -1187,7 +1218,7 @@ dependencies = [ "glob", "half", "hashbrown 0.14.5", - "indexmap 2.13.0", + "indexmap 2.13.1", "itertools 0.13.0", "log", "num_cpus", @@ -1236,7 +1267,7 @@ dependencies = [ "chrono", "half", "hashbrown 0.14.5", - "indexmap 2.13.0", + "indexmap 2.13.1", "instant", "libc", "num_cpus", @@ -1294,7 +1325,7 @@ dependencies = [ "datafusion-functions-aggregate-common", "datafusion-functions-window-common", "datafusion-physical-expr-common", - "indexmap 2.13.0", + "indexmap 2.13.1", "paste", "serde_json", "sqlparser 0.51.0", @@ -1357,7 +1388,7 @@ dependencies = [ "datafusion-physical-expr", "datafusion-physical-expr-common", "half", - "indexmap 2.13.0", + "indexmap 2.13.1", "log", "paste", ] @@ -1437,7 +1468,7 @@ dependencies = [ "datafusion-expr", "datafusion-physical-expr", "hashbrown 0.14.5", - "indexmap 2.13.0", + "indexmap 2.13.1", "itertools 0.13.0", "log", "paste", @@ -1465,7 +1496,7 @@ dependencies = [ "datafusion-physical-expr-common", "half", "hashbrown 0.14.5", - "indexmap 2.13.0", + "indexmap 2.13.1", "itertools 0.13.0", "log", "paste", @@ -1527,7 +1558,7 @@ dependencies = [ "futures", "half", "hashbrown 0.14.5", - "indexmap 2.13.0", + "indexmap 2.13.1", "itertools 0.13.0", "log", "once_cell", @@ -1548,7 +1579,7 @@ dependencies = [ "arrow-schema", "datafusion-common", "datafusion-expr", - "indexmap 2.13.0", + "indexmap 2.13.1", "log", "regex", "sqlparser 0.51.0", @@ -1694,9 +1725,9 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "fastrand" -version = "2.3.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "filetime" @@ -1950,7 +1981,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.13.0", + "indexmap 2.13.1", "slab", "tokio", "tokio-util", @@ -1969,7 +2000,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.4.0", - "indexmap 2.13.0", + "indexmap 2.13.1", "slab", "tokio", "tokio-util", @@ -2163,9 +2194,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" dependencies = [ "atomic-waker", "bytes", @@ -2178,7 +2209,6 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "pin-utils", "smallvec", "tokio", "want", @@ -2190,7 +2220,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.8.1", + "hyper 1.9.0", "hyper-util", "pin-project-lite", "tokio", @@ -2221,7 +2251,7 @@ dependencies = [ "futures-util", "http 1.4.0", "http-body 1.0.1", - "hyper 1.8.1", + "hyper 1.9.0", "libc", "pin-project-lite", "socket2 0.6.3", @@ -2265,12 +2295,13 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" dependencies = [ "displaydoc", "potential_utf", + "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -2278,9 +2309,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap", @@ -2291,9 +2322,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -2305,15 +2336,15 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" [[package]] name = "icu_properties" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" dependencies = [ "icu_collections", "icu_locale_core", @@ -2325,15 +2356,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" [[package]] name = "icu_provider" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", @@ -2383,9 +2414,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.13.0" +version = "2.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +checksum = "45a8a2b9cb3e0b0c1803dbb0758ffac5de2f425b23c28f518faabd9d805342ff" dependencies = [ "equivalent", "hashbrown 0.16.1", @@ -2520,9 +2551,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.92" +version = "0.3.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc4c90f45aa2e6eacbe8645f77fdea542ac97a494bcd117a67df9ff4d611f995" +checksum = "2e04e2ef80ce82e13552136fabeef8a5ed1f985a96805761cbb9a2c34e7664d9" dependencies = [ "cfg-if", "futures-util", @@ -2601,9 +2632,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.183" +version = "0.2.184" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" +checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" [[package]] name = "libloading" @@ -2646,9 +2677,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.25" +version = "1.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52f4c29e2a68ac30c9087e1b772dc9f44a2b66ed44edf2266cf2be9b03dafc1" +checksum = "fc3a226e576f50782b3305c5ccf458698f92798987f551c6a02efe8276721e22" dependencies = [ "cc", "libc", @@ -2673,9 +2704,9 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "lock_api" @@ -2720,7 +2751,7 @@ dependencies = [ "cactus", "cfgrammar", "filetime", - "indexmap 2.13.0", + "indexmap 2.13.1", "lazy_static", "lrtable", "num-traits", @@ -3240,7 +3271,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset 0.4.2", - "indexmap 2.13.0", + "indexmap 2.13.1", ] [[package]] @@ -3250,7 +3281,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset 0.5.7", - "indexmap 2.13.0", + "indexmap 2.13.1", ] [[package]] @@ -3297,12 +3328,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "pkg-config" version = "0.3.32" @@ -3360,9 +3385,9 @@ dependencies = [ [[package]] name = "potential_utf" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ "zerovec", ] @@ -3560,6 +3585,7 @@ version = "0.1.0" dependencies = [ "anyhow", "arrow", + "asap_sketchlib", "async-trait", "axum", "base64 0.21.7", @@ -3593,7 +3619,6 @@ dependencies = [ "serde_yaml", "sketch-core", "sketch_db_common", - "sketchlib-rust", "snap", "sql_utilities", "sqlparser 0.59.0", @@ -3986,9 +4011,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "seq-macro" @@ -4077,7 +4102,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.13.1", "itoa", "ryu", "serde", @@ -4136,12 +4161,12 @@ checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" name = "sketch-core" version = "0.1.0" dependencies = [ + "asap_sketchlib", "clap 4.6.0", "ctor", "dsrs", "rmp-serde", "serde", - "sketchlib-rust", "xxhash-rust", ] @@ -4158,24 +4183,6 @@ dependencies = [ "sql_utilities", ] -[[package]] -name = "sketchlib-rust" -version = "0.1.0" -source = "git+https://github.com/ProjectASAP/sketchlib-rust?rev=440427438fdaf3ac2298b53ee148f9e12a64ffcc#440427438fdaf3ac2298b53ee148f9e12a64ffcc" -dependencies = [ - "bytes", - "clap 4.6.0", - "pcap", - "prost", - "prost-build", - "rand 0.9.2", - "rmp-serde", - "serde", - "serde-big-array", - "smallvec", - "twox-hash 2.1.2", -] - [[package]] name = "slab" version = "0.4.12" @@ -4584,9 +4591,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", "zerovec", @@ -4604,9 +4611,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.50.0" +version = "1.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +checksum = "2bd1c4c0fc4a7ab90fc15ef6daaa3ec3b893f004f915f2392557ed23237820cd" dependencies = [ "bytes", "libc", @@ -4621,9 +4628,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", @@ -4677,20 +4684,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.1.0+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97251a7c317e03ad83774a8752a7e81fb6067740609f75ea2b585b569a59198f" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.25.8+spec-1.1.0" +version = "0.25.10+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16bff38f1d86c47f9ff0647e6838d7bb362522bdf44006c7068c2b1e606f1f3c" +checksum = "a82418ca169e235e6c399a84e395ab6debeb3bc90edc959bf0f48647c6a32d1b" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.13.1", "toml_datetime", "toml_parser", "winnow 1.0.1", @@ -4698,9 +4705,9 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.1.0+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2334f11ee363607eb04df9b8fc8a13ca1715a72ba8662a26ac285c98aabb4011" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ "winnow 1.0.1", ] @@ -4720,7 +4727,7 @@ dependencies = [ "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.8.1", + "hyper 1.9.0", "hyper-timeout", "hyper-util", "percent-encoding", @@ -5055,9 +5062,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.115" +version = "0.2.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6523d69017b7633e396a89c5efab138161ed5aafcbc8d3e5c5a42ae38f50495a" +checksum = "0551fc1bb415591e3372d0bc4780db7e587d84e2a7e79da121051c5c4b89d0b0" dependencies = [ "cfg-if", "once_cell", @@ -5068,9 +5075,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.65" +version = "0.4.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1faf851e778dfa54db7cd438b70758eba9755cb47403f3496edd7c8fc212f0" +checksum = "03623de6905b7206edd0a75f69f747f134b7f0a2323392d664448bf2d3c5d87e" dependencies = [ "js-sys", "wasm-bindgen", @@ -5078,9 +5085,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.115" +version = "0.2.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3a6c758eb2f701ed3d052ff5737f5bfe6614326ea7f3bbac7156192dc32e67" +checksum = "7fbdf9a35adf44786aecd5ff89b4563a90325f9da0923236f6104e603c7e86be" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5088,9 +5095,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.115" +version = "0.2.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921de2737904886b52bcbb237301552d05969a6f9c40d261eb0533c8b055fedf" +checksum = "dca9693ef2bab6d4e6707234500350d8dad079eb508dca05530c85dc3a529ff2" dependencies = [ "bumpalo", "proc-macro2", @@ -5101,9 +5108,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.115" +version = "0.2.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a93e946af942b58934c604527337bad9ae33ba1d5c6900bbb41c2c07c2364a93" +checksum = "39129a682a6d2d841b6c429d0c51e5cb0ed1a03829d8b3d1e69a011e62cb3d3b" dependencies = [ "unicode-ident", ] @@ -5125,7 +5132,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" dependencies = [ "anyhow", - "indexmap 2.13.0", + "indexmap 2.13.1", "wasm-encoder", "wasmparser", ] @@ -5138,15 +5145,15 @@ checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ "bitflags 2.11.0", "hashbrown 0.15.5", - "indexmap 2.13.0", + "indexmap 2.13.1", "semver", ] [[package]] name = "web-sys" -version = "0.3.92" +version = "0.3.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84cde8507f4d7cfcb1185b8cb5890c494ffea65edbe1ba82cfd63661c805ed94" +checksum = "cd70027e39b12f0849461e08ffc50b9cd7688d942c1c8e3c7b22273236b4dd0a" dependencies = [ "js-sys", "wasm-bindgen", @@ -5498,7 +5505,7 @@ checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" dependencies = [ "anyhow", "heck 0.5.0", - "indexmap 2.13.0", + "indexmap 2.13.1", "prettyplease", "syn 2.0.117", "wasm-metadata", @@ -5529,7 +5536,7 @@ checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", "bitflags 2.11.0", - "indexmap 2.13.0", + "indexmap 2.13.1", "log", "serde", "serde_derive", @@ -5548,7 +5555,7 @@ checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" dependencies = [ "anyhow", "id-arena", - "indexmap 2.13.0", + "indexmap 2.13.1", "log", "semver", "serde", @@ -5560,9 +5567,9 @@ dependencies = [ [[package]] name = "writeable" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "xxhash-rust" @@ -5587,9 +5594,9 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yoke" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -5598,9 +5605,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", @@ -5630,18 +5637,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", @@ -5651,9 +5658,9 @@ dependencies = [ [[package]] name = "zerotrie" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", "yoke", @@ -5662,9 +5669,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "yoke", "zerofrom", @@ -5673,9 +5680,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", diff --git a/asap-common/sketch-core/Cargo.toml b/asap-common/sketch-core/Cargo.toml index f4f93c9..fe9cf24 100644 --- a/asap-common/sketch-core/Cargo.toml +++ b/asap-common/sketch-core/Cargo.toml @@ -9,7 +9,7 @@ serde.workspace = true rmp-serde = "1.1" xxhash-rust = { version = "0.8", features = ["xxh32"] } dsrs = { git = "https://github.com/ProjectASAP/datasketches-rs", rev = "d748ec75c80fff21f7b24897244dd1c895df2e9a" } -sketchlib-rust = { git = "https://github.com/ProjectASAP/sketchlib-rust", rev = "440427438fdaf3ac2298b53ee148f9e12a64ffcc" } +asap_sketchlib = { git = "https://github.com/ProjectASAP/asap_sketchlib" } clap = { version = "4.0", features = ["derive"] } [dev-dependencies] diff --git a/asap-common/sketch-core/report.md b/asap-common/sketch-core/report.md index 05384e3..9dfde74 100644 --- a/asap-common/sketch-core/report.md +++ b/asap-common/sketch-core/report.md @@ -1,6 +1,6 @@ # Report -Compares the **legacy** sketch implementations in `sketch-core` vs the **sketchlib-rust** backends (Count-Min Sketch, Count-Min-With-Heap, KLL, HydraKLL). +Compares the **legacy** sketch implementations in `sketch-core` vs the **asap_sketchlib** backends (Count-Min Sketch, Count-Min-With-Heap, KLL, HydraKLL). ## Fidelity harness @@ -32,23 +32,23 @@ cargo test -p sketch-core | width | n | domain | Mode | Pearson corr | MAPE (%) | RMSE (%) | |-------|--------|--------|----------------|----------------|----------|----------| | 1024 | 100000 | 1000 | Legacy | 0.9998451189 | 24.48 | 52.76 | -| 1024 | 100000 | 1000 | sketchlib-rust | 0.9998387103 | 24.36 | 54.11 | +| 1024 | 100000 | 1000 | asap_sketchlib | 0.9998387103 | 24.36 | 54.11 | #### depth=5 | width | n | domain | Mode | Pearson corr | MAPE (%) | RMSE (%) | |-------|--------|--------|----------------|----------------|----------|----------| | 2048 | 200000 | 2000 | Legacy | 0.9999733814 | 8.75 | 29.94 | -| 2048 | 200000 | 2000 | sketchlib-rust | 0.9999744627 | 8.37 | 28.84 | +| 2048 | 200000 | 2000 | asap_sketchlib | 0.9999744627 | 8.37 | 28.84 | | 2048 | 50000 | 500 | Legacy | 1.0000000000 | 0.00 | 0.00 | -| 2048 | 50000 | 500 | sketchlib-rust | 1.0000000000 | 0.00 | 0.00 | +| 2048 | 50000 | 500 | asap_sketchlib | 1.0000000000 | 0.00 | 0.00 | #### depth=7 | width | n | domain | Mode | Pearson corr | MAPE (%) | RMSE (%) | |-------|--------|--------|----------------|----------------|----------|----------| | 4096 | 200000 | 2000 | Legacy | 0.9999993694 | 0.20 | 3.69 | -| 4096 | 200000 | 2000 | sketchlib-rust | 0.9999993499 | 0.21 | 4.27 | +| 4096 | 200000 | 2000 | asap_sketchlib | 0.9999993499 | 0.21 | 4.27 | --- @@ -61,16 +61,16 @@ The heap is maintained by local updates; recall is measured against the **true** | width | n | domain | heap_size | Mode | Top-k recall | Pearson (top-k) | MAPE (%) | RMSE (%) | |-------|--------|--------|-----------|----------------|--------------|-----------------|----------|----------| | 1024 | 100000 | 1000 | 10 | Legacy | 0.40 | 0.9571 | 0.174 | 0.319 | -| 1024 | 100000 | 1000 | 10 | sketchlib-rust | 0.80 | 1.0000 | 0.000 | 0.000 | +| 1024 | 100000 | 1000 | 10 | asap_sketchlib | 0.80 | 1.0000 | 0.000 | 0.000 | #### depth=5 | width | n | domain | heap_size | Mode | Top-k recall | Pearson (top-k) | MAPE (%) | RMSE (%) | |-------|--------|--------|-----------|----------------|--------------|-----------------|----------|----------| | 2048 | 200000 | 2000 | 20 | Legacy | 0.60 | 0.9964 | 0.045 | 0.101 | -| 2048 | 200000 | 2000 | 20 | sketchlib-rust | 1.00 | 0.9982 | 0.021 | 0.067 | +| 2048 | 200000 | 2000 | 20 | asap_sketchlib | 1.00 | 0.9982 | 0.021 | 0.067 | | 2048 | 200000 | 2000 | 50 | Legacy | 0.40 | 0.9999983 | 5.60 | 16.49 | -| 2048 | 200000 | 2000 | 50 | sketchlib-rust | 0.48 | 0.9999990 | 3.90 | 12.95 | +| 2048 | 200000 | 2000 | 50 | asap_sketchlib | 0.48 | 0.9999990 | 3.90 | 12.95 | --- @@ -84,23 +84,23 @@ For each quantile \(q\), we compute the sketch estimate `est_value`, then: | n_updates | Mode | q=0.5 | q=0.9 | q=0.99 | |-----------|----------------|---------|---------|---------| | 200000 | Legacy | 0.0104 | 0.0145 | 0.0028 | -| 200000 | sketchlib-rust | 0.0275 | 0.0470 | 0.0061 | +| 200000 | asap_sketchlib | 0.0275 | 0.0470 | 0.0061 | | 50000 | Legacy | 0.0131 | 0.0091 | 0.0054 | -| 50000 | sketchlib-rust | 0.0110 | 0.0116 | 0.0031 | +| 50000 | asap_sketchlib | 0.0110 | 0.0116 | 0.0031 | #### k=50 | n_updates | Mode | q=0.5 | q=0.9 | q=0.99 | |-----------|----------------|---------|---------|---------| | 200000 | Legacy | 0.0013 | 0.0021 | 0.0012 | -| 200000 | sketchlib-rust | 0.0101 | 0.0044 | 0.0074 | +| 200000 | asap_sketchlib | 0.0101 | 0.0044 | 0.0074 | #### k=200 | n_updates | Mode | q=0.5 | q=0.9 | q=0.99 | |-----------|----------------|---------|---------|---------| | 200000 | Legacy | 0.0021 | 0.0036 | 0.0000 | -| 200000 | sketchlib-rust | 0.0015 | 0.0001 | 0.0002 | +| 200000 | asap_sketchlib | 0.0015 | 0.0001 | 0.0002 | --- @@ -111,15 +111,15 @@ For each quantile \(q\), we compute the sketch estimate `est_value`, then: | k | n | domain | Mode | q=0.5 (mean / max) | q=0.9 (mean / max) | |-----|--------|--------|----------------|--------------------|--------------------| | 20 | 200000 | 200 | Legacy | 0.0170 / 0.0546 | 0.0165 / 0.0452 | -| 20 | 200000 | 200 | sketchlib-rust | 0.0254 / 0.0629 | 0.0546 / 0.0942 | +| 20 | 200000 | 200 | asap_sketchlib | 0.0254 / 0.0629 | 0.0546 / 0.0942 | #### rows=3, cols=128 | k | n | domain | Mode | q=0.5 (mean / max) | q=0.9 (mean / max) | |-----|--------|--------|----------------|--------------------|--------------------| | 20 | 200000 | 200 | Legacy | 0.0166 / 0.0591 | 0.0114 / 0.0304 | -| 20 | 200000 | 200 | sketchlib-rust | 0.0216 / 0.0534 | 0.0238 / 0.1087 | +| 20 | 200000 | 200 | asap_sketchlib | 0.0216 / 0.0534 | 0.0238 / 0.1087 | | 50 | 200000 | 200 | Legacy | 0.0099 / 0.0352 | 0.0087 / 0.0330 | -| 50 | 200000 | 200 | sketchlib-rust | 0.0119 / 0.0458 | 0.0119 / 0.0296 | +| 50 | 200000 | 200 | asap_sketchlib | 0.0119 / 0.0458 | 0.0119 / 0.0296 | | 20 | 100000 | 100 | Legacy | 0.0141 / 0.0574 | 0.0149 / 0.0471 | -| 20 | 100000 | 100 | sketchlib-rust | 0.0202 / 0.0621 | 0.0287 / 0.0779 | +| 20 | 100000 | 100 | asap_sketchlib | 0.0202 / 0.0621 | 0.0287 / 0.0779 | diff --git a/asap-common/sketch-core/src/bin/sketchlib_fidelity.rs b/asap-common/sketch-core/src/bin/sketchlib_fidelity.rs index 4203af3..ca95cb6 100644 --- a/asap-common/sketch-core/src/bin/sketchlib_fidelity.rs +++ b/asap-common/sketch-core/src/bin/sketchlib_fidelity.rs @@ -337,17 +337,17 @@ fn main() { let cms_mode = if matches!(args.cms_impl, ImplMode::Legacy) { "Legacy" } else { - "sketchlib-rust" + "asap_sketchlib" }; let cmwh_mode = if matches!(args.cmwh_impl, ImplMode::Legacy) { "Legacy" } else { - "sketchlib-rust" + "asap_sketchlib" }; let kll_mode = if matches!(args.kll_impl, ImplMode::Legacy) { "Legacy" } else { - "sketchlib-rust" + "asap_sketchlib" }; // CountMinSketch: multiple (depth, width, n, domain) diff --git a/asap-common/sketch-core/src/config.rs b/asap-common/sketch-core/src/config.rs index 6bdccb6..b7c6abc 100644 --- a/asap-common/sketch-core/src/config.rs +++ b/asap-common/sketch-core/src/config.rs @@ -5,7 +5,7 @@ use std::sync::OnceLock; pub enum ImplMode { /// Use the original hand-written implementations. Legacy, - /// Use sketchlib-rust backed implementations. + /// Use asap_sketchlib backed implementations. Sketchlib, } @@ -19,21 +19,21 @@ pub const DEFAULT_CMWH_IMPL: ImplMode = ImplMode::Sketchlib; static COUNTMIN_MODE: OnceLock = OnceLock::new(); -/// Returns true if Count-Min operations should use sketchlib-rust internally. +/// Returns true if Count-Min operations should use asap_sketchlib internally. pub fn use_sketchlib_for_count_min() -> bool { *COUNTMIN_MODE.get_or_init(|| DEFAULT_CMS_IMPL) == ImplMode::Sketchlib } static KLL_MODE: OnceLock = OnceLock::new(); -/// Returns true if KLL operations should use sketchlib-rust internally. +/// Returns true if KLL operations should use asap_sketchlib internally. pub fn use_sketchlib_for_kll() -> bool { *KLL_MODE.get_or_init(|| DEFAULT_KLL_IMPL) == ImplMode::Sketchlib } static COUNTMIN_WITH_HEAP_MODE: OnceLock = OnceLock::new(); -/// Returns true if Count-Min-With-Heap operations should use sketchlib-rust internally for the +/// Returns true if Count-Min-With-Heap operations should use asap_sketchlib internally for the /// Count-Min portion. pub fn use_sketchlib_for_count_min_with_heap() -> bool { *COUNTMIN_WITH_HEAP_MODE.get_or_init(|| DEFAULT_CMWH_IMPL) == ImplMode::Sketchlib diff --git a/asap-common/sketch-core/src/count_min.rs b/asap-common/sketch-core/src/count_min.rs index a77e8bb..d0ebc13 100644 --- a/asap-common/sketch-core/src/count_min.rs +++ b/asap-common/sketch-core/src/count_min.rs @@ -32,7 +32,7 @@ struct WireFormat { pub enum CountMinBackend { /// Original hand-written matrix implementation. Legacy(Vec>), - /// sketchlib-rust backed implementation. + /// asap_sketchlib backed implementation. Sketchlib(SketchlibCms), } diff --git a/asap-common/sketch-core/src/count_min_sketchlib.rs b/asap-common/sketch-core/src/count_min_sketchlib.rs index 20fe7be..6fb3924 100644 --- a/asap-common/sketch-core/src/count_min_sketchlib.rs +++ b/asap-common/sketch-core/src/count_min_sketchlib.rs @@ -1,6 +1,6 @@ -use sketchlib_rust::{CountMin, RegularPath, SketchInput, Vector2D}; +use asap_sketchlib::{CountMin, RegularPath, SketchInput, Vector2D}; -/// Concrete Count-Min type from sketchlib-rust when sketchlib backend is enabled. +/// Concrete Count-Min type from asap_sketchlib when sketchlib backend is enabled. /// Uses f64 counters (Vector2D) for weighted updates without integer rounding. pub type SketchlibCms = CountMin, RegularPath>; diff --git a/asap-common/sketch-core/src/count_min_with_heap.rs b/asap-common/sketch-core/src/count_min_with_heap.rs index 39d69b3..f02efc7 100644 --- a/asap-common/sketch-core/src/count_min_with_heap.rs +++ b/asap-common/sketch-core/src/count_min_with_heap.rs @@ -58,7 +58,7 @@ pub enum CountMinWithHeapBackend { sketch: Vec>, heap: Vec, }, - /// sketchlib-rust CMSHeap implementation. + /// asap_sketchlib CMSHeap implementation. Sketchlib(SketchlibCMSHeap), } diff --git a/asap-common/sketch-core/src/count_min_with_heap_sketchlib.rs b/asap-common/sketch-core/src/count_min_with_heap_sketchlib.rs index 2328bbc..451c5b8 100644 --- a/asap-common/sketch-core/src/count_min_with_heap_sketchlib.rs +++ b/asap-common/sketch-core/src/count_min_with_heap_sketchlib.rs @@ -1,10 +1,10 @@ -//! Sketchlib-rust CMSHeap integration for CountMinSketchWithHeap. +//! asap_sketchlib CMSHeap integration for CountMinSketchWithHeap. //! -//! Uses CMSHeap (CountMin + HHHeap) from sketchlib-rust instead of CountMin + local heap, +//! Uses CMSHeap (CountMin + HHHeap) from asap_sketchlib instead of CountMin + local heap, //! providing automatic top-k tracking during insert and merge. -use sketchlib_rust::RegularPath; -use sketchlib_rust::{CMSHeap, SketchInput, Vector2D}; +use asap_sketchlib::RegularPath; +use asap_sketchlib::{CMSHeap, SketchInput, Vector2D}; /// Wire-format heap item (key, value) to avoid circular dependency with count_min_with_heap. pub struct WireHeapItem { @@ -12,7 +12,7 @@ pub struct WireHeapItem { pub value: f64, } -/// Concrete Count-Min-with-Heap type from sketchlib-rust (CMS + HHHeap). +/// Concrete Count-Min-with-Heap type from asap_sketchlib (CMS + HHHeap). pub type SketchlibCMSHeap = CMSHeap, RegularPath>; /// Creates a fresh CMSHeap with the given dimensions and heap capacity. @@ -81,7 +81,7 @@ pub fn heap_to_wire(cms_heap: &SketchlibCMSHeap) -> Vec { .iter() .map(|hh_item| { let key = match &hh_item.key { - sketchlib_rust::HeapItem::String(s) => s.clone(), + asap_sketchlib::HeapItem::String(s) => s.clone(), other => format!("{:?}", other), }; WireHeapItem { diff --git a/asap-common/sketch-core/src/kll.rs b/asap-common/sketch-core/src/kll.rs index 1628744..5751cb2 100644 --- a/asap-common/sketch-core/src/kll.rs +++ b/asap-common/sketch-core/src/kll.rs @@ -33,7 +33,7 @@ pub struct KllSketchData { pub enum KllBackend { /// dsrs (DataSketches) implementation. Legacy(KllDoubleSketch), - /// sketchlib-rust backed implementation. + /// asap_sketchlib backed implementation. Sketchlib(SketchlibKll), } diff --git a/asap-common/sketch-core/src/kll_sketchlib.rs b/asap-common/sketch-core/src/kll_sketchlib.rs index 96c03ab..d49d80b 100644 --- a/asap-common/sketch-core/src/kll_sketchlib.rs +++ b/asap-common/sketch-core/src/kll_sketchlib.rs @@ -1,6 +1,6 @@ -use sketchlib_rust::{SketchInput, KLL}; +use asap_sketchlib::{SketchInput, KLL}; -/// Concrete KLL type from sketchlib-rust when sketchlib backend is enabled. +/// Concrete KLL type from asap_sketchlib when sketchlib backend is enabled. pub type SketchlibKll = KLL; /// Creates a fresh sketchlib KLL sketch with the requested accuracy parameter `k`. diff --git a/asap-query-engine/Cargo.toml b/asap-query-engine/Cargo.toml index df006de..2d68f78 100644 --- a/asap-query-engine/Cargo.toml +++ b/asap-query-engine/Cargo.toml @@ -57,7 +57,7 @@ zstd = "0.13" reqwest = { version = "0.11", features = ["json"] } tracing-appender = "0.2" elastic_dsl_utilities.workspace = true -sketchlib-rust = { git = "https://github.com/ProjectASAP/sketchlib-rust", rev = "440427438fdaf3ac2298b53ee148f9e12a64ffcc" } +asap_sketchlib = { git = "https://github.com/ProjectASAP/asap_sketchlib" } [[bin]] name = "precompute_engine" diff --git a/asap-query-engine/Dockerfile b/asap-query-engine/Dockerfile index 890a065..56c221a 100644 --- a/asap-query-engine/Dockerfile +++ b/asap-query-engine/Dockerfile @@ -8,7 +8,7 @@ LABEL description="QueryEngine Rust service for SketchDB" WORKDIR /code -# Required by prost-build dependencies (e.g., sketchlib-rust) during cargo build +# Required by prost-build dependencies (e.g., asap_sketchlib) during cargo build RUN apt-get update && apt-get install -y --no-install-recommends \ protobuf-compiler \ && rm -rf /var/lib/apt/lists/* diff --git a/asap-query-engine/src/drivers/ingest/otel.rs b/asap-query-engine/src/drivers/ingest/otel.rs index 6b5032a..e909a18 100644 --- a/asap-query-engine/src/drivers/ingest/otel.rs +++ b/asap-query-engine/src/drivers/ingest/otel.rs @@ -7,6 +7,7 @@ use std::collections::HashMap; use std::io::Read; +use asap_sketchlib::proto::sketchlib::{sketch_envelope, SketchEnvelope}; use axum::{body::Bytes, extract::State, routing::post, Json, Router}; use flate2::read::GzDecoder; use opentelemetry_proto::tonic::collector::metrics::v1::{ @@ -16,7 +17,6 @@ use opentelemetry_proto::tonic::collector::metrics::v1::{ use opentelemetry_proto::tonic::common::v1::any_value::Value as AnyValueVariant; use opentelemetry_proto::tonic::metrics::v1::number_data_point::Value as NumberValue; use prost::Message; -use sketchlib_rust::proto::sketchlib::{sketch_envelope, SketchEnvelope}; use tonic::{Request, Response, Status}; use tracing::{debug, error, info}; diff --git a/asap-query-engine/src/stores/promsketch_store/query.rs b/asap-query-engine/src/stores/promsketch_store/query.rs index 2fdb653..0de029b 100644 --- a/asap-query-engine/src/stores/promsketch_store/query.rs +++ b/asap-query-engine/src/stores/promsketch_store/query.rs @@ -1,4 +1,4 @@ -use sketchlib_rust::{EHSketchList, SketchInput, UniformSampling}; +use asap_sketchlib::{EHSketchList, SketchInput, UniformSampling}; use super::series::PromSketchMemSeries; @@ -86,7 +86,7 @@ fn eval_kll_quantile( /// Evaluate sampling-based functions (avg, count, sum, sum2, stddev, stdvar). /// -/// Since sketchlib-rust's `UniformSampling` exposes `samples()` and `total_seen()` +/// Since asap_sketchlib's `UniformSampling` exposes `samples()` and `total_seen()` /// but not dedicated query methods like the Go version, we compute statistics /// from the raw merged samples. fn eval_sampling_stat( diff --git a/asap-query-engine/src/stores/promsketch_store/series.rs b/asap-query-engine/src/stores/promsketch_store/series.rs index c0871f2..cdffe49 100644 --- a/asap-query-engine/src/stores/promsketch_store/series.rs +++ b/asap-query-engine/src/stores/promsketch_store/series.rs @@ -1,4 +1,4 @@ -use sketchlib_rust::{ +use asap_sketchlib::{ EHSketchList, EHUnivOptimized, ExponentialHistogram, SketchInput, UniformSampling, KLL, }; diff --git a/asap-summary-ingest/templates/udfs/countminsketch_count.rs.j2 b/asap-summary-ingest/templates/udfs/countminsketch_count.rs.j2 index 59d563b..b8c3d54 100644 --- a/asap-summary-ingest/templates/udfs/countminsketch_count.rs.j2 +++ b/asap-summary-ingest/templates/udfs/countminsketch_count.rs.j2 @@ -3,7 +3,7 @@ rmp-serde = "1.1" serde = { version = "1.0", features = ["derive"] } twox-hash = "2.1.0" -sketchlib-rust = { git = "https://github.com/ProjectASAP/sketchlib-rust", rev = "440427438fdaf3ac2298b53ee148f9e12a64ffcc" } +asap_sketchlib = { git = "https://github.com/ProjectASAP/asap_sketchlib" } */ use arroyo_udf_plugin::udf; @@ -11,7 +11,7 @@ use rmp_serde::Serializer; use serde::{Deserialize, Serialize}; use twox_hash::XxHash32; -use sketchlib_rust::{CountMin as SketchlibCountMin, RegularPath, SketchInput, Vector2D}; +use asap_sketchlib::{CountMin as SketchlibCountMin, RegularPath, SketchInput, Vector2D}; // Count-Min Sketch parameters const DEPTH: usize = {{ depth }}; // Number of hash functions @@ -62,7 +62,7 @@ impl CountMinSketch { #[udf] fn countminsketch_count(keys: Vec<&str>, values: Vec) -> Option> { if use_sketchlib_for_cms() { - // sketchlib-rust backed implementation: integer counters + internal hashing. + // asap_sketchlib backed implementation: integer counters + internal hashing. let mut inner = SketchlibCms::with_dimensions(DEPTH, WIDTH); for &key in keys.iter() { diff --git a/asap-summary-ingest/templates/udfs/countminsketch_sum.rs.j2 b/asap-summary-ingest/templates/udfs/countminsketch_sum.rs.j2 index a0d1c87..563ea2a 100644 --- a/asap-summary-ingest/templates/udfs/countminsketch_sum.rs.j2 +++ b/asap-summary-ingest/templates/udfs/countminsketch_sum.rs.j2 @@ -3,7 +3,7 @@ rmp-serde = "1.1" serde = { version = "1.0", features = ["derive"] } twox-hash = "2.1.0" -sketchlib-rust = { git = "https://github.com/ProjectASAP/sketchlib-rust", rev = "440427438fdaf3ac2298b53ee148f9e12a64ffcc" } +asap_sketchlib = { git = "https://github.com/ProjectASAP/asap_sketchlib" } */ use arroyo_udf_plugin::udf; @@ -11,7 +11,7 @@ use rmp_serde::Serializer; use serde::{Deserialize, Serialize}; use twox_hash::XxHash32; -use sketchlib_rust::{CountMin as SketchlibCountMin, RegularPath, SketchInput, Vector2D}; +use asap_sketchlib::{CountMin as SketchlibCountMin, RegularPath, SketchInput, Vector2D}; // Count-Min Sketch parameters const DEPTH: usize = {{ depth }}; // Number of hash functions @@ -67,7 +67,7 @@ fn countminsketch_sum(keys: Vec<&str>, values: Vec) -> Option> { } if use_sketchlib_for_cms() { - // sketchlib-rust backed implementation: integer counters + internal hashing. + // asap_sketchlib backed implementation: integer counters + internal hashing. let mut inner = SketchlibCms::with_dimensions(DEPTH, WIDTH); for (i, &key) in keys.iter().enumerate() { diff --git a/asap-summary-ingest/templates/udfs/countminsketchwithheap_topk.rs.j2 b/asap-summary-ingest/templates/udfs/countminsketchwithheap_topk.rs.j2 index 73d814c..0fd3fc5 100644 --- a/asap-summary-ingest/templates/udfs/countminsketchwithheap_topk.rs.j2 +++ b/asap-summary-ingest/templates/udfs/countminsketchwithheap_topk.rs.j2 @@ -3,7 +3,7 @@ rmp-serde = "1.1" serde = { version = "1.0", features = ["derive"] } twox-hash = "2.1.0" -sketchlib-rust = { git = "https://github.com/ProjectASAP/sketchlib-rust", rev = "440427438fdaf3ac2298b53ee148f9e12a64ffcc" } +asap_sketchlib = { git = "https://github.com/ProjectASAP/asap_sketchlib" } */ use std::cmp::Ordering; @@ -14,7 +14,7 @@ use rmp_serde::Serializer; use serde::{Deserialize, Serialize}; use twox_hash::XxHash32; -use sketchlib_rust::{CountMin as SketchlibCountMin, RegularPath, SketchInput, Vector2D}; +use asap_sketchlib::{CountMin as SketchlibCountMin, RegularPath, SketchInput, Vector2D}; // Count-Min Sketch with Heap parameters const DEPTH: usize = {{ depth }}; // Number of hash functions @@ -114,7 +114,7 @@ impl PartialOrd for HeapItem { struct CountMinSketchWithHeap { // Legacy wire-format matrix representation. sketch: CountMinSketch, - // Optional sketchlib-rust Count-Min used when ARROYO_SKETCH_CMWH_IMPL selects sketchlib mode. + // Optional asap_sketchlib Count-Min used when ARROYO_SKETCH_CMWH_IMPL selects sketchlib mode. sketchlib: Option, topk_heap: BinaryHeap, // Maintain as heap during processing heap_size: usize, diff --git a/asap-summary-ingest/templates/udfs/datasketcheskll_.rs.j2 b/asap-summary-ingest/templates/udfs/datasketcheskll_.rs.j2 index 1b74982..593c59d 100644 --- a/asap-summary-ingest/templates/udfs/datasketcheskll_.rs.j2 +++ b/asap-summary-ingest/templates/udfs/datasketcheskll_.rs.j2 @@ -1,6 +1,6 @@ /* [dependencies] -sketchlib-rust = { git = "https://github.com/ProjectASAP/sketchlib-rust", rev = "440427438fdaf3ac2298b53ee148f9e12a64ffcc" } +asap_sketchlib = { git = "https://github.com/ProjectASAP/asap_sketchlib" } arroyo-udf-plugin = "0.1" rmp-serde = "1.1" serde = { version = "1.0", features = ["derive"] } @@ -8,7 +8,7 @@ serde = { version = "1.0", features = ["derive"] } use arroyo_udf_plugin::udf; use serde::{Deserialize, Serialize}; -use sketchlib_rust::{KLL, SketchInput}; +use asap_sketchlib::{KLL, SketchInput}; const DEFAULT_K: u16 = {{ k }}; diff --git a/asap-summary-ingest/templates/udfs/hydrakll_.rs.j2 b/asap-summary-ingest/templates/udfs/hydrakll_.rs.j2 index 10c51c6..198a882 100644 --- a/asap-summary-ingest/templates/udfs/hydrakll_.rs.j2 +++ b/asap-summary-ingest/templates/udfs/hydrakll_.rs.j2 @@ -1,6 +1,6 @@ /* [dependencies] -sketchlib-rust = { git = "https://github.com/ProjectASAP/sketchlib-rust", rev = "440427438fdaf3ac2298b53ee148f9e12a64ffcc" } +asap_sketchlib = { git = "https://github.com/ProjectASAP/asap_sketchlib" } arroyo-udf-plugin = "0.1" rmp-serde = "1.1" serde = { version = "1.0", features = ["derive"] } @@ -10,7 +10,7 @@ xxhash-rust = { version = "0.8", features = ["xxh32"] } use arroyo_udf_plugin::udf; use rmp_serde::Serializer; use serde::{Deserialize, Serialize}; -use sketchlib_rust::{KLL, SketchInput}; +use asap_sketchlib::{KLL, SketchInput}; use xxhash_rust::xxh32::xxh32; const ROW_NUM: usize = {{ row_num }}; diff --git a/asap-tools/docs/deployment.md b/asap-tools/docs/deployment.md index ab67cbf..de6dac2 100644 --- a/asap-tools/docs/deployment.md +++ b/asap-tools/docs/deployment.md @@ -145,7 +145,7 @@ This file defines which components get synced to CloudLab. Each component must b ```bash asap-tools asap-common -sketchlib-rust +asap_sketchlib asap-query-engine asap-planner-rs asap-summary-ingest