@@ -102,7 +102,11 @@ def time_streamset_arrow_raw_values(
102102
103103
104104def time_streamset_windows_values (
105- streamset : btrdb .stream .StreamSet , start : int , end : int , width_ns : int , version : int = 0
105+ streamset : btrdb .stream .StreamSet ,
106+ start : int ,
107+ end : int ,
108+ width_ns : int ,
109+ version : int = 0 ,
106110) -> Dict [str , Union [str , int , float ]]:
107111 """Return the elapsed time for the streamset windows values query
108112
@@ -139,7 +143,11 @@ def time_streamset_windows_values(
139143
140144
141145def time_streamset_arrow_windows_values (
142- streamset : btrdb .stream .StreamSet , start : int , end : int , width_ns : int , version : int = 0
146+ streamset : btrdb .stream .StreamSet ,
147+ start : int ,
148+ end : int ,
149+ width_ns : int ,
150+ version : int = 0 ,
143151) -> Dict [str , Union [str , int , float ]]:
144152 """Return the elapsed time for the streamset arrow window values query
145153
@@ -180,7 +188,11 @@ def time_streamset_arrow_windows_values(
180188
181189
182190def time_streamset_aligned_windows_values (
183- streamset : btrdb .stream .StreamSet , start : int , end : int , pointwidth : int , version : int = 0
191+ streamset : btrdb .stream .StreamSet ,
192+ start : int ,
193+ end : int ,
194+ pointwidth : int ,
195+ version : int = 0 ,
184196) -> Dict [str , Union [str , int , float ]]:
185197 """Return the elapsed time for the streamset window values query
186198
@@ -217,7 +229,11 @@ def time_streamset_aligned_windows_values(
217229
218230
219231def time_streamset_arrow_aligned_windows_values (
220- streamset : btrdb .stream .StreamSet , start : int , end : int , pointwidth : int , version : int = 0
232+ streamset : btrdb .stream .StreamSet ,
233+ start : int ,
234+ end : int ,
235+ pointwidth : int ,
236+ version : int = 0 ,
221237) -> Dict [str , Union [str , int , float ]]:
222238 """Return the elapsed time for the streamset arrow aligned window values query
223239
@@ -264,7 +280,6 @@ def _create_streamset_result_dict(
264280 return {
265281 "n_streams" : len (streamset ),
266282 "total_points" : point_count ,
267-
268283 "total_time_seconds" : total_time ,
269284 "streamset_version" : version ,
270285 }
@@ -274,9 +289,15 @@ def main():
274289 """Run a single run of the benchmarks"""
275290 conn = btrdb .connect (profile = "andy" )
276291 stream1 = conn .stream_from_uuid (
277- list (conn .streams_in_collection ("andy/7064-6684-5e6e-9e14-ff9ca7bae46e" ))[0 ].uuid
292+ list (conn .streams_in_collection ("andy/7064-6684-5e6e-9e14-ff9ca7bae46e" ))[
293+ 0
294+ ].uuid
295+ )
296+ stream2 = conn .stream_from_uuid (
297+ list (conn .streams_in_collection ("andy/30e6-d72f-5cc7-9966-bc1579dc4a72" ))[
298+ 0
299+ ].uuid
278300 )
279- stream2 = conn .stream_from_uuid (list (conn .streams_in_collection ("andy/30e6-d72f-5cc7-9966-bc1579dc4a72" ))[0 ].uuid )
280301 streamset = btrdb .stream .StreamSet ([stream1 , stream2 ])
281302 start = max (stream1 .earliest ()[0 ].time , stream2 .earliest ()[0 ].time )
282303 end = min (stream1 .latest ()[0 ].time , stream2 .latest ()[0 ].time )
@@ -286,7 +307,7 @@ def main():
286307 res_list = []
287308 for f in [time_streamset_raw_values , time_streamset_arrow_raw_values ]:
288309 res = f (streamset , start , end , 0 )
289- res ["func" ] = f .__name__
310+ res ["func" ] = f .__name__
290311 # for f in [time_streamset_windows_values, time_streamset_arrow_windows_values]:
291312 # res = f(streamset, start, end, width_ns=width_ns, version=0)
292313 # res["func"] = f.__name__
@@ -295,6 +316,8 @@ def main():
295316 # res["func"] = res
296317
297318 return res
298- if __name__ == "__main__" :
319+
320+
321+ if __name__ == "__main__" :
299322 results = main ()
300- print (pandas .DataFrame (results ))
323+ print (pandas .DataFrame (results ))
0 commit comments