aturi indexer with listRecords and countRecords endpoints

use jemalloc

ptr.pet 7d1ad7f3 8c2ff8f4

verified
+34 -2
+21
Cargo.lock
··· 46 "serde", 47 "serde_json", 48 "tapped", 49 "tokio", 50 "tracing", 51 "tracing-subscriber", ··· 1527 checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" 1528 dependencies = [ 1529 "cfg-if", 1530 ] 1531 1532 [[package]]
··· 46 "serde", 47 "serde_json", 48 "tapped", 49 + "tikv-jemallocator", 50 "tokio", 51 "tracing", 52 "tracing-subscriber", ··· 1528 checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" 1529 dependencies = [ 1530 "cfg-if", 1531 + ] 1532 + 1533 + [[package]] 1534 + name = "tikv-jemalloc-sys" 1535 + version = "0.6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7" 1536 + source = "registry+https://github.com/rust-lang/crates.io-index" 1537 + checksum = "cd8aa5b2ab86a2cefa406d889139c162cbb230092f7d1d7cbc1716405d852a3b" 1538 + dependencies = [ 1539 + "cc", 1540 + "libc", 1541 + ] 1542 + 1543 + [[package]] 1544 + name = "tikv-jemallocator" 1545 + version = "0.6.1" 1546 + source = "registry+https://github.com/rust-lang/crates.io-index" 1547 + checksum = "0359b4327f954e0567e69fb191cf1436617748813819c94b8cd4a431422d053a" 1548 + dependencies = [ 1549 + "libc", 1550 + "tikv-jemalloc-sys", 1551 ] 1552 1553 [[package]]
+4 -1
Cargo.toml
··· 14 tracing = "0.1" 15 tracing-subscriber = "0.3" 16 futures = "0.3" 17 - chrono = "0.4"
··· 14 tracing = "0.1" 15 tracing-subscriber = "0.3" 16 futures = "0.3" 17 + chrono = "0.4" 18 + 19 + [target.'cfg(not(target_env = "msvc"))'.dependencies] 20 + tikv-jemallocator = "0.6"
+3
default.nix
··· 1 { 2 lib, 3 rustPlatform, 4 ... 5 }: 6 rustPlatform.buildRustPackage { ··· 13 ./src ./Cargo.toml ./Cargo.lock 14 ]; 15 }; 16 17 cargoLock = { 18 lockFile = ./Cargo.lock;
··· 1 { 2 lib, 3 rustPlatform, 4 + cmake, 5 ... 6 }: 7 rustPlatform.buildRustPackage { ··· 14 ./src ./Cargo.toml ./Cargo.lock 15 ]; 16 }; 17 + 18 + nativeBuildInputs = [cmake]; 19 20 cargoLock = { 21 lockFile = ./Cargo.lock;
+2 -1
flake.nix
··· 16 packages.default = pkgs.callPackage ./default.nix {}; 17 devShells = { 18 default = pkgs.mkShell { 19 - buildInputs = with pkgs; [ 20 rust-analyzer 21 cargo 22 gemini-cli 23 go 24 ]; 25 }; 26 };
··· 16 packages.default = pkgs.callPackage ./default.nix {}; 17 devShells = { 18 default = pkgs.mkShell { 19 + nativeBuildInputs = with pkgs; [ 20 rust-analyzer 21 cargo 22 gemini-cli 23 go 24 + cmake 25 ]; 26 }; 27 };
+4
src/main.rs
··· 8 use tapped::{TapClient, Event, RecordAction, RecordEvent}; 9 use fjall::{Database, Keyspace, KeyspaceCreateOptions}; 10 11 #[derive(Clone)] 12 struct AppState { 13 db: Database,
··· 8 use tapped::{TapClient, Event, RecordAction, RecordEvent}; 9 use fjall::{Database, Keyspace, KeyspaceCreateOptions}; 10 11 + #[cfg(not(target_env = "msvc"))] 12 + #[global_allocator] 13 + static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; 14 + 15 #[derive(Clone)] 16 struct AppState { 17 db: Database,