MCPcopy Create free account
hub / github.com/enviodev/hypersync-client-python / test_intstr_mapping

Function test_intstr_mapping

test.py:89–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87
88
89async def test_intstr_mapping():
90 client = make_client()
91 total_time = 0
92 for _ in range(NUM_BENCHMARK_RUNS):
93 start_time = time.time()
94
95 res = await client.collect_arrow(
96 QUERY,
97 hypersync.StreamConfig(
98 hex_output=HexOutput.PREFIXED,
99 column_mapping=hypersync.ColumnMapping(
100 trace={
101 TraceField.TRANSACTION_POSITION: DataType.INT32,
102 },
103 transaction={
104 TransactionField.BLOCK_NUMBER: DataType.INT64,
105 TransactionField.VALUE: DataType.FLOAT32,
106 },
107 decoded_log={
108 "value": DataType.INTSTR,
109 },
110 ),
111 event_signature="Transfer(address indexed from, address indexed to, uint256 value)",
112 ),
113 )
114
115 # print(res.data.decoded_logs.column("value"))
116
117 execution_time = (time.time() - start_time) * 1000
118 total_time += execution_time
119 print(f"intstr_mapping time: {format(execution_time, '.9f')}ms")
120
121
122async def test_create_parquet_folder():

Callers 1

mainFunction · 0.85

Calls 2

make_clientFunction · 0.85
collect_arrowMethod · 0.45

Tested by

no test coverage detected