@@ -940,30 +940,30 @@ passing the path to the file.
940940"""
941941function get_total_program_roofline (xplane_file_path:: String )
942942 @assert isfile (xplane_file_path) " File not found: $xplane_file_path "
943-
943+
944944 try
945945 # Pass the file path directly to xspace_to_tools_data
946946 data, is_binary = xspace_to_tools_data ([xplane_file_path], " roofline_model" )
947-
947+
948948 s = String (data)
949949 j = JSON. parse (s)
950-
950+
951951 if j isa Vector && length (j) > 0
952952 table = j[1 ]
953953 cols = table[" cols" ]
954954 rows = table[" rows" ]
955-
955+
956956 if length (rows) > 0
957957 col_ids = [c[" id" ] for c in cols]
958958 op_idx = findfirst (== (" operation" ), col_ids)
959-
959+
960960 for row in rows
961961 cells = row[" c" ]
962962 if op_idx != = nothing && op_idx <= length (cells)
963963 op_name = cells[op_idx][" v" ]
964964 # Look for the aggregate row
965965 if op_name == " Program" || op_name == " Total"
966- res = Dict {String, Any} ()
966+ res = Dict {String,Any} ()
967967 for (i, col) in enumerate (cols)
968968 if i <= length (cells)
969969 res[col[" id" ]] = cells[i][" v" ]
@@ -978,9 +978,9 @@ function get_total_program_roofline(xplane_file_path::String)
978978 catch e
979979 @debug " Error calling roofline_model tool: $e "
980980 end
981-
981+
982982 @warn " Roofline tool returned no data or failed. This may happen if the profile lacks step markers."
983- return Dict {String, Any} ()
983+ return Dict {String,Any} ()
984984end
985985
986986function _extract_kwargs_from_expr (args... )
0 commit comments