Skip to content

Commit ce2a3df

Browse files
committed
Fine-tuned default values
1 parent ff4b82e commit ce2a3df

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Apps/QueryLogsDuckDBApp/App.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ public sealed class App : IDnsApplication, IDnsQueryLogger, IDnsQueryLogs
3636
{
3737
#region variables
3838

39-
private const int CHANNEL_CAPACITY = 200_000;
40-
private const int MAX_BATCH_SIZE = 10_000;
39+
private const int CHANNEL_CAPACITY = 20_000;
40+
private const int MAX_BATCH_SIZE = 1000;
4141
private Channel<LogEntry> _channel;
4242
private DuckDBConnection _conn;
4343
private Task _consumerTask;
@@ -77,7 +77,7 @@ public void Dispose()
7777
resp.Answer.Select(r => $"{r.Type} {r.RDATA}"));
7878
}
7979

80-
private async Task BulkInsertAsync(List<LogEntry> logs)
80+
private void BulkInsert(List<LogEntry> logs)
8181
{
8282
try
8383
{
@@ -199,13 +199,13 @@ private async Task ProcessLogsAsync()
199199

200200
if (batch.Count > 0)
201201
{
202-
await BulkInsertAsync(batch);
202+
BulkInsert(batch);
203203
batch.Clear();
204204
}
205205
}
206206

207207
if (batch.Count > 0)
208-
await BulkInsertAsync(batch);
208+
BulkInsert(batch);
209209
}
210210

211211
#endregion private

0 commit comments

Comments
 (0)