File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -199,21 +199,24 @@ def generate_performance_report(
199199 .where (dm .Result .run_id == run_id )
200200 )
201201
202- df = pd .read_sql_query (
203- sql = sql ,
204- con = conn .connect (),
202+ df = (
203+ pd .read_sql_query (sql = sql , con = conn .connect ())
204+ .astype ({impl : "string" for impl in implementations })
205+ .fillna ("n/a" )
205206 )
206207
207208 for index , row in df .iterrows ():
208209 for impl in implementations :
209210 time = row [impl ]
210- if time :
211- NANOSECONDS_IN_MILISECONDS : Final [float ] = 1000 * 1000.0
212- time /= NANOSECONDS_IN_MILISECONDS
213211
214- time = str (round (time , 2 )) + "ms"
215- else :
216- time = "n/a"
212+ if time == "n/a" :
213+ pass
214+
215+ NANOSECONDS_IN_MILISECONDS : Final [float ] = 1000 * 1000.0
216+ time = float (time )
217+ time /= NANOSECONDS_IN_MILISECONDS
218+
219+ time = str (round (time , 2 )) + "ms"
217220
218221 df .at [index , impl ] = time
219222
You can’t perform that action at this time.
0 commit comments