File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " findlargedir"
3
- version = " 0.1.0 "
3
+ version = " 0.1.3 "
4
4
authors = [
" Dinko Korunic <[email protected] >" ]
5
5
categories = [" command-line-utilities" ]
6
6
description = " find all blackhole directories with a huge amount of filesystem entries in a flat structure"
@@ -20,6 +20,7 @@ spinach = "2.1.0"
20
20
anyhow = " 1.0.65"
21
21
human_format = " 1.0.3"
22
22
human_bytes = { version = " 0.3.1" , features = [" fast" ] }
23
+ humantime = " 2.1.0"
23
24
clap = { version = " 3.2.22" , features = [" derive" ] }
24
25
ctrlc = { version = " 3.2.3" , features = [" termination" ] }
25
26
rm_rf = " 0.6.2"
Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ mod walk;
7
7
use anyhow:: { Context , Error , Result } ;
8
8
use clap:: Parser ;
9
9
use fs_err as fs;
10
+ use humantime:: Duration ;
10
11
use std:: collections:: HashSet ;
11
12
use std:: os:: unix:: fs:: MetadataExt ;
12
13
use std:: sync:: atomic:: AtomicBool ;
13
14
use std:: sync:: Arc ;
15
+ use std:: time:: Instant ;
14
16
use tempfile:: TempDir ;
15
17
use tikv_jemallocator:: Jemalloc ;
16
18
@@ -68,6 +70,8 @@ fn main() -> Result<(), Error> {
68
70
69
71
println ! ( "Scanning filesystem path {} started" , path. display( ) ) ;
70
72
73
+ let start = Instant :: now ( ) ;
74
+
71
75
walk:: parallel_search (
72
76
& path,
73
77
path_metadata,
@@ -76,7 +80,11 @@ fn main() -> Result<(), Error> {
76
80
& args,
77
81
) ;
78
82
79
- println ! ( "Scanning filesystem path {} completed" , path. display( ) ) ;
83
+ println ! (
84
+ "Scanning filesystem path {} completed. Time elapsed: {}" ,
85
+ path. display( ) ,
86
+ Duration :: from( start. elapsed( ) )
87
+ ) ;
80
88
}
81
89
82
90
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments