Skip to content

Commit 9f6278b

Browse files
committed
silent param and fix batch count from here
1 parent 0610f9e commit 9f6278b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Motely/Executors/JsonSearchExecutor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ private IMotelySearch CreateSearch(MotelyJsonConfig config, List<string>? seeds)
148148
string lastProgressLine = "";
149149
Action<MotelySeedScoreTally> onResultFound = (score) =>
150150
{
151+
// Skip output in silent mode
152+
if (_params.Silent)
153+
{
154+
return;
155+
}
156+
151157
Console.Write("\r" + new string(' ', Console.WindowWidth - 1) + "\r");
152158
Console.WriteLine($"{score.Seed},{score.Score},{string.Join(",", score.TallyColumns)}");
153159
if (!string.IsNullOrEmpty(lastProgressLine))

Motely/Executors/NativeFilterExecutor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ private IMotelySearch BuildSearch<TFilter>(IMotelySeedFilterDesc<TFilter> filter
134134
var settings = new MotelySearchSettings<TFilter>(filterDesc)
135135
.WithThreadCount(_params.Threads)
136136
.WithBatchCharacterCount(_params.BatchSize)
137+
.WithSilent(_params.Silent)
137138
.WithProgressCallback(progressCallback);
138139

139140
settings = ApplyChainedFilters(settings);
@@ -220,7 +221,7 @@ private void PrintSummary(IMotelySearch search, TimeSpan duration)
220221
Console.WriteLine(_cancelled ? "\n✅ Search stopped gracefully" : "\n✅ Search completed");
221222

222223
// Use the actual tracked counts from the search
223-
var lastBatch = search.CompletedBatchCount > 0 ? _params.StartBatch + search.CompletedBatchCount - 1 : 0;
224+
var lastBatch = search.CompletedBatchCount > 0 ? _params.StartBatch + search.CompletedBatchCount : 0;
224225

225226
Console.WriteLine($" Last batch: {lastBatch}");
226227
Console.WriteLine($" Seeds searched: {search.TotalSeedsSearched:N0}");

0 commit comments

Comments
 (0)