@@ -17,6 +17,7 @@ struct Arguments {
17
17
int number_of_threads;
18
18
int num_hashtables;
19
19
bool store_archive;
20
+ string archive_name;
20
21
bool force_write;
21
22
};
22
23
@@ -35,7 +36,7 @@ void parse_args(int argc, char** argv, Arguments &arguments) {
35
36
.store_into (arguments.filelist_sketches );
36
37
37
38
parser.add_argument (" index_directory_name" )
38
- .help (" The directory where the index will be stored (needs to be empty )" )
39
+ .help (" The directory where the index will be stored (must be a directory )" )
39
40
.required ()
40
41
.store_into (arguments.index_directory_name );
41
42
@@ -57,6 +58,11 @@ void parse_args(int argc, char** argv, Arguments &arguments) {
57
58
.implicit_value (true )
58
59
.store_into (arguments.store_archive );
59
60
61
+ parser.add_argument (" -a" , " --archive-name" )
62
+ .help (" The name of the archive (will be discarded if store-archive is false)" )
63
+ .default_value (" index.tar.gz" )
64
+ .store_into (arguments.archive_name );
65
+
60
66
parser.add_argument (" -f" , " --force-write" )
61
67
.help (" Force write the index to the directory" )
62
68
.default_value (false )
@@ -83,6 +89,7 @@ void show_arguments(Arguments &arguments) {
83
89
cout << " * number_of_threads: " << arguments.number_of_threads << endl;
84
90
cout << " * num_hashtables: " << arguments.num_hashtables << endl;
85
91
cout << " * store_archive: " << arguments.store_archive << endl;
92
+ cout << " * archive_name: " << (arguments.store_archive ? arguments.archive_name : " N/A" ) << endl;
86
93
cout << " * force_write: " << arguments.force_write << endl;
87
94
cout << " * " << endl;
88
95
cout << " *********************************" << endl;
@@ -115,8 +122,8 @@ int main(int argc, char** argv) {
115
122
MultiSketchIndex multi_sketch_index (arguments.num_hashtables );
116
123
compute_index_from_sketches (sketches, multi_sketch_index, arguments.number_of_threads );
117
124
cout << " Index built." << endl;
118
- cout << " Some index stats:" << endl;
119
- multi_sketch_index.show_index_stats ();
125
+ // cout << "Some index stats:" << endl;
126
+ // multi_sketch_index.show_index_stats();
120
127
121
128
122
129
cout << " Writing index to file..." << endl;
@@ -129,6 +136,7 @@ int main(int argc, char** argv) {
129
136
arguments.number_of_threads ,
130
137
info_of_sketches,
131
138
arguments.store_archive ,
139
+ arguments.archive_name ,
132
140
arguments.force_write );
133
141
if (!success) {
134
142
cout << " Error writing index to file." << endl;
0 commit comments