Skip to content

Commit

Permalink
new: added individual segment hashing to improve index rebuilding per…
Browse files Browse the repository at this point in the history
…formance
  • Loading branch information
pamburus committed Jan 27, 2024
1 parent a579414 commit 7945fc8
Show file tree
Hide file tree
Showing 6 changed files with 525 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .build/capnp/index.capnp.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"source": "e9a1ab0d52fc8a798553feddc01dd0d3221ea2551134bba7993598f4171300af",
"target": "fc0896783f60725dfcde8665bbb81f0fa1385d4b7cda23037ea282219a305e9c"
"source": "a24016e5b59980a2589d90683fed3eda21b9d736133eaa9d31b7e0af80d0ebb2",
"target": "8bea793178710915cd183a95aa10c99a41bd6d23ccec7bcf2b295b48205a6b9b"
}
49 changes: 48 additions & 1 deletion Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ categories = ["command-line-utilities"]
description = "Utility for viewing json-formatted log files."
keywords = ["cli", "human", "log"]
name = "hl"
version = "0.25.1-beta.1"
version = "0.25.1-beta.2"
edition = "2021"
build = "build.rs"

Expand All @@ -17,7 +17,6 @@ serde_json = { version = "1", features = ["raw_value"] }
sha2 = "0"

[dependencies]
nu-ansi-term = "0"
atoi = "1"
bincode = "1"
bitmask = "0"
Expand All @@ -36,13 +35,15 @@ derive_deref = "1"
enum-map = "2"
flate2 = "1"
generic-array = "0"
gxhash = "3"
heapless = "0"
hex = "0"
htp = { git = "https://github.com/pamburus/htp.git" }
humantime = "2"
itertools = "0"
itoa = { version = "1", default-features = false }
notify = { version = "6", features = ["macos_kqueue"] }
nu-ansi-term = "0"
num_cpus = "1"
once_cell = "1"
pest = "2"
Expand Down
13 changes: 13 additions & 0 deletions schema/index.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ struct SourceBlock {
size @1 :UInt32;
index @2 :Index;
chronology @3 :Chronology;
hash @4 :Hash;
}

# Index holds index information of a block or a whole file.
Expand Down Expand Up @@ -65,6 +66,18 @@ struct Chronology {
jumps @3 :List(UInt32);
}

# HashAlgorithm is an algorithm used to calculate data hash.
enum HashAlgorithm {
sha256 @0;
gxhash64 @1;
}

# Hash is a hash of some data.
struct Hash {
algorithm @0 :HashAlgorithm;
value @1 :Data;
}

# Various flags.
const flagLevelDebug :UInt64 = 0x0000000000000001;
const flagLevelInfo :UInt64 = 0x0000000000000002;
Expand Down
Loading

0 comments on commit 7945fc8

Please sign in to comment.