@@ -161,25 +161,27 @@ def htmlProfile(
161161 htmlFile .write ("<body>\n " )
162162 htmlFile .write (' <div id="myDiv"></div>\n ' )
163163 htmlFile .write (" <script>\n " )
164-
164+
165165 trace_count = 0
166166 if cpu_data :
167167 # CPU
168168 trace_count += 1
169169 htmlFile .write (f" var trace{ trace_count } = {{\n " )
170170 writeTrace (htmlFile , x_axis = cpu_x , y_axis = cpu_data [:, 1 ], x_name = "x" , y_name = "y1" , label = "CPU" )
171171 htmlFile .write ("};\n " )
172-
172+
173173 trace_count += 1
174174 # RAM, in GB
175175 htmlFile .write (f" var trace{ trace_count } = {{\n " )
176176 writeTrace (htmlFile , x_axis = cpu_x , y_axis = cpu_data [:, 2 ] / 1000 , x_name = "x" , y_name = "y2" , label = "RAM" )
177177 htmlFile .write ("};\n " )
178-
178+
179179 # Active threads
180180 trace_count += 1
181181 htmlFile .write (f" var trace{ trace_count } = {{\n " )
182- writeTrace (htmlFile , x_axis = cpu_x , y_axis = cpu_data [:, 4 ] * 100.0 , x_name = "x" , y_name = "y1" , label = "Active threads" )
182+ writeTrace (
183+ htmlFile , x_axis = cpu_x , y_axis = cpu_data [:, 4 ] * 100.0 , x_name = "x" , y_name = "y1" , label = "Active threads"
184+ )
183185 htmlFile .write ("};\n " )
184186
185187 if disk_data :
@@ -205,7 +207,7 @@ def htmlProfile(
205207 for node in tree .to_list ():
206208 print (node .info )
207209 if not sync_time :
208- sync_time = (min ([x ["start" ] for x in algm_records ]) + header ) / 1e9
210+ sync_time = (min ([x ["start" ] for x in algm_records ]) + header ) / 1e9
209211 htmlFile .write (treeNodeToHtml (node , lmax , sync_time , header , trace_count , cpu_x [- 1 ]))
210212 dataString += ",trace%i" % trace_count if trace_count else "trace%i" % trace_count
211213 trace_count += 1
@@ -341,7 +343,6 @@ def main(argv=None):
341343 args = parser .parse_args (argv ) # allow getting them supplied to `main()` in tests
342344
343345 print (f"Attaching to process { args .pid } " )
344-
345346
346347 if not args .nodisk :
347348 # start the disk monitor in a separate thread
@@ -394,7 +395,7 @@ def main(argv=None):
394395 else :
395396 disk_x = disk_data = None
396397 sync_time = 0
397-
398+
398399 if not args .nocpu :
399400 # Read in CPU and memory activity log
400401 sync_time , cpu_data = parse_cpu_log (args .logfile , cleanup = not args .noclean )
@@ -409,7 +410,6 @@ def main(argv=None):
409410 cpu_data = cpu_x = None
410411 fill_factor = sync_time = 0
411412
412-
413413 # Create HTML output with Plotly
414414 htmlProfile (
415415 filename = args .outfile ,
0 commit comments