rename capacity argument to index_capacity

This commit is contained in:
yggverse 2025-06-09 13:36:56 +03:00
parent 37c0f387e8
commit fe6b22e338
3 changed files with 3 additions and 3 deletions

View file

@ -66,7 +66,7 @@ htcount --source /var/log/nginx/access.log\
-m, --match-time <MATCH_TIME>
Filter records match time pattern (e.g. `%d/%b/%Y`)
-c, --capacity <CAPACITY>
-c, --index-capacity <CAPACITY>
Expected memory index capacity
[default: 100]

View file

@ -36,7 +36,7 @@ pub struct Argument {
/// Expected memory index capacity
#[arg(short, long, default_value_t = 100)]
pub capacity: usize,
pub index_capacity: usize,
/// Exclude host(s) from index
#[arg(short, long)]

View file

@ -37,7 +37,7 @@ fn main() -> anyhow::Result<()> {
.as_ref()
.map(|t| chrono::Local::now().format(t).to_string());
let mut index: HashMap<String, usize> = HashMap::with_capacity(argument.capacity);
let mut index: HashMap<String, usize> = HashMap::with_capacity(argument.index_capacity);
'l: for l in BufReader::new(File::open(&argument.source)?).lines() {
let line = l?;