@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
58
58
cerr << PACKAGE_NAME " " GITREV << endl;
59
59
60
60
map<string,string> options;
61
- regex optregex (" --(help|log-to|verbose|target|sqlite|version|dump-all-graphs|seed|dry-run|max-queries|rngstate |exclude-catalog)(?:=((?:.|\n )*))?" );
61
+ regex optregex (" --(help|log-to|verbose|target|sqlite|version|dump-all-graphs|seed|dry-run|max-queries|rng-state |exclude-catalog)(?:=((?:.|\n )*))?" );
62
62
63
63
for (char **opt = argv+1 ;opt < argv+argc; opt++) {
64
64
smatch match;
@@ -83,7 +83,7 @@ int main(int argc, char *argv[])
83
83
" --dry-run print queries instead of executing them" << endl <<
84
84
" --exclude-catalog don't generate queries using catalog relations" << endl <<
85
85
" --max-queries=long terminate after generating this many queries" << endl <<
86
- " --rngstate =string deserialize dumped rng state" << endl <<
86
+ " --rng-state =string deserialize dumped rng state" << endl <<
87
87
" --verbose emit progress output" << endl <<
88
88
" --version print version information and exit" << endl <<
89
89
" --help print available command line options and exit" << endl;
@@ -110,8 +110,8 @@ int main(int argc, char *argv[])
110
110
long queries_generated = 0 ;
111
111
schema->fill_scope (scope);
112
112
113
- if (options.count (" rngstate " )) {
114
- istringstream (options[" rngstate " ]) >> smith::rng;
113
+ if (options.count (" rng-state " )) {
114
+ istringstream (options[" rng-state " ]) >> smith::rng;
115
115
} else {
116
116
smith::rng.seed (options.count (" seed" ) ? stoi (options[" seed" ]) : getpid ());
117
117
}
@@ -163,10 +163,11 @@ int main(int argc, char *argv[])
163
163
else
164
164
dut = make_shared<dut_libpq>(options[" target" ]);
165
165
166
- while (1 )
166
+ while (1 ) /* Loop to recover connection loss */
167
167
{
168
168
try {
169
- while (1 ) {
169
+ while (1 ) { /* Main loop */
170
+
170
171
if (options.count (" max-queries" )
171
172
&& (++queries_generated > stol (options[" max-queries" ]))) {
172
173
if (global_cerr_logger)
0 commit comments