MCPcopy Index your code
hub / github.com/questdb/questdb / generate_test_data

Function generate_test_data

benchmarks/src/main/python/insert_bench.py:41–53  ·  view source on GitHub ↗
(num_records)

Source from the content-addressed store, hash-verified

39
40
41def generate_test_data(num_records):
42 data = []
43 names = ['Alice', 'Bob', 'Charlie', 'David', 'Eve']
44 domains = ['gmail.com', 'yahoo.com', 'hotmail.com', 'example.com']
45
46 for i in range(num_records):
47 name = random.choice(names)
48 email = f"{name.lower()}{i}@{random.choice(domains)}"
49 age = random.randint(18, 80)
50 created_at = datetime.now()
51 data.append((name, email, age, created_at))
52
53 return data
54
55
56async def batch_insert(pool, records, batch_size=1000):

Callers 1

mainFunction · 0.85

Calls 1

appendMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…