MCPcopy
hub / github.com/jackc/pgx / newBenchmarkWriteTableCopyFromSrc

Function newBenchmarkWriteTableCopyFromSrc

bench_test.go:383–402  ·  view source on GitHub ↗
(count int)

Source from the content-addressed store, hash-verified

381}
382
383func newBenchmarkWriteTableCopyFromSrc(count int) pgx.CopyFromSource {
384 return &benchmarkWriteTableCopyFromSrc{
385 count: count,
386 row: []any{
387 "varchar_1",
388 "varchar_2",
389 &pgtype.Text{},
390 time.Date(2000, 1, 1, 0, 0, 0, 0, time.Local),
391 &pgtype.Date{},
392 1,
393 2,
394 &pgtype.Int4{},
395 time.Date(2001, 1, 1, 0, 0, 0, 0, time.Local),
396 time.Date(2002, 1, 1, 0, 0, 0, 0, time.Local),
397 true,
398 false,
399 true,
400 },
401 }
402}
403
404func benchmarkWriteNRowsViaInsert(b *testing.B, n int) {
405 conn := mustConnect(b, mustParseConfig(b, os.Getenv("PGX_TEST_DATABASE")))

Calls

no outgoing calls

Tested by

no test coverage detected