@@ -56,9 +56,14 @@ public class ConnImplBenchmark {
56
56
public void setUp () throws IOException {
57
57
java .util .logging .Logger .getGlobal ().setLevel (Level .ALL );
58
58
59
- connectionSettingsReadAPIEnabled = ConnectionSettings .newBuilder ().setUseReadAPI (true ).build ();
60
- connectionSettingsReadAPIDisabled =
61
- ConnectionSettings .newBuilder ().setUseReadAPI (false ).build ();
59
+ connectionSettingsReadAPIEnabled = ConnectionSettings .newBuilder ()
60
+ .setUseReadAPI (true )
61
+ .setMaxResults (500L )
62
+ .setJobTimeoutMs (Long .MAX_VALUE )
63
+ .build ();
64
+ connectionSettingsReadAPIDisabled = ConnectionSettings .newBuilder ()
65
+ .setUseReadAPI (false )
66
+ .build ();
62
67
}
63
68
64
69
@ Benchmark
@@ -153,8 +158,8 @@ private long getResultHash(BigQueryResult bigQueryResultSet) throws SQLException
153
158
System .out .println ("\n Running" );
154
159
while (rs .next ()) {
155
160
hash += computeHash (rs , "vendor_id" , ResultSet ::getString );
156
- hash += computeHash (rs , "pickup_datetime" , ResultSet ::getString );
157
- hash += computeHash (rs , "dropoff_datetime" , ResultSet ::getString );
161
+ hash += computeHash (rs , "pickup_datetime" , ResultSet ::getLong );
162
+ hash += computeHash (rs , "dropoff_datetime" , ResultSet ::getLong );
158
163
hash += computeHash (rs , "passenger_count" , ResultSet ::getLong );
159
164
hash += computeHash (rs , "trip_distance" , ResultSet ::getDouble );
160
165
hash += computeHash (rs , "rate_code" , ResultSet ::getString );
0 commit comments