mirror of
https://github.com/YGGverse/htcount.git
synced 2026-03-31 17:15:37 +00:00
rename capacity argument to index_capacity
This commit is contained in:
parent
37c0f387e8
commit
fe6b22e338
3 changed files with 3 additions and 3 deletions
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue