@@ -660,15 +660,15 @@ function Base.show(io::IO, results::ProfileResults)
660660 p75 = quantile (relevant_times, 0.75 )
661661 p95 = quantile (relevant_times, 0.95 )
662662
663- highlight_p95 = Highlighter ((data, i, j) -> (names (data)[j] == " time" ) &&
664- (data[i,j] >= p95),
665- crayon " red" )
666- highlight_p75 = Highlighter ((data, i, j) -> (names (data)[j] == " time" ) &&
667- (data[i,j] >= p75),
668- crayon " yellow" )
669- highlight_bold = Highlighter ((data, i, j) -> (names (data)[j] == " name" ) &&
670- (data[! , :time ][i] >= p75),
671- crayon " bold" )
663+ highlight_p95 = TextHighlighter ((data, i, j) -> (names (data)[j] == " time" ) &&
664+ (data[i,j] >= p95),
665+ crayon " red" )
666+ highlight_p75 = TextHighlighter ((data, i, j) -> (names (data)[j] == " time" ) &&
667+ (data[i,j] >= p75),
668+ crayon " yellow" )
669+ highlight_bold = TextHighlighter ((data, i, j) -> (names (data)[j] == " name" ) &&
670+ (data[! , :time ][i] >= p75),
671+ crayon " bold" )
672672
673673 (highlight_p95, highlight_p75, highlight_bold)
674674 end
@@ -829,8 +829,9 @@ function Base.show(io::IO, results::ProfileResults)
829829 end
830830 end
831831 highlighters = time_highlighters (df)
832- pretty_table (io, df; header, alignment, formatters, highlighters, crop,
833- body_hlines= trace_divisions)
832+ highlighters = isempty (highlighters) ? PrettyTables. TextHighlighter[] : collect (highlighters)
833+ pretty_table (io, df; column_labels= header, alignment, formatters= [formatters], highlighters, fit_table_in_display_horizontally = (crop== :horizontal ), fit_table_in_display_vertically= false )# ,
834+ # body_hlines=trace_divisions)
834835 else
835836 df = summarize_trace (df)
836837
@@ -844,7 +845,7 @@ function Base.show(io::IO, results::ProfileResults)
844845 header = [summary_column_names[name] for name in names (df)]
845846 alignment = [name in [" name" , " time_dist" ] ? :l : :r for name in names (df)]
846847 highlighters = time_highlighters (df)
847- pretty_table (io, df; header, alignment, formatters= summary_formatter (df), highlighters, crop)
848+ pretty_table (io, df; column_labels = header, alignment, formatters= [ summary_formatter (df)] , highlighters= collect (highlighters), fit_table_in_display_horizontally = ( crop== :horizontal ), fit_table_in_display_vertically = false )
848849 end
849850 end
850851
@@ -929,8 +930,8 @@ function Base.show(io::IO, results::ProfileResults)
929930 end
930931 end
931932 highlighters = time_highlighters (df)
932- pretty_table (io, df; header, alignment, formatters, highlighters, crop,
933- body_hlines= trace_divisions)
933+ pretty_table (io, df; column_labels = header, alignment, formatters= [formatters] , highlighters= collect (highlighters), fit_table_in_display_horizontally = ( crop== :horizontal ), fit_table_in_display_vertically = false )
934+ # body_hlines=trace_divisions)
934935 else
935936 df = summarize_trace (results. device)
936937
@@ -944,7 +945,7 @@ function Base.show(io::IO, results::ProfileResults)
944945 header = [summary_column_names[name] for name in names (df)]
945946 alignment = [name in [" name" , " time_dist" ] ? :l : :r for name in names (df)]
946947 highlighters = time_highlighters (df)
947- pretty_table (io, df; header, alignment, formatters= summary_formatter (df), highlighters, crop)
948+ pretty_table (io, df; column_labels = header, alignment, formatters= [ summary_formatter (df)] , highlighters= collect (highlighters), fit_table_in_display_horizontally = ( crop== :horizontal ), fit_table_in_display_vertically = false )
948949 end
949950 end
950951
@@ -981,7 +982,7 @@ function Base.show(io::IO, results::ProfileResults)
981982 for color in unique (df. color)
982983 if color != = nothing
983984 ids = df[df. color .== color, :id ]
984- highlighter = Highlighter (Crayon (; foreground= color)) do data, i, j
985+ highlighter = TextHighlighter (Crayon (; foreground= color)) do data, i, j
985986 names (data)[j] in [" name" , " domain" ] && data[! , :id ][i] in ids
986987 end
987988 push! (color_highlighters, highlighter)
@@ -1002,7 +1003,7 @@ function Base.show(io::IO, results::ProfileResults)
10021003 end
10031004 end
10041005 highlighters = tuple (color_highlighters... , time_highlighters (df)... )
1005- pretty_table (io, df; header, alignment, formatters, highlighters, crop)
1006+ pretty_table (io, df; column_labels = header, alignment, formatters= [formatters] , highlighters= collect (highlighters), fit_table_in_display_horizontally = ( crop== :horizontal ), fit_table_in_display_vertically = false )
10061007 else
10071008 # merge the domain and name into a single column
10081009 nvtx_ranges. name = map (nvtx_ranges. name, nvtx_ranges. domain) do name, domain
@@ -1025,7 +1026,7 @@ function Base.show(io::IO, results::ProfileResults)
10251026 header = [summary_column_names[name] for name in names (df)]
10261027 alignment = [name in [" name" , " time_dist" ] ? :l : :r for name in names (df)]
10271028 highlighters = time_highlighters (df)
1028- pretty_table (io, df; header, alignment, formatters= summary_formatter (df), highlighters, crop)
1029+ pretty_table (io, df; column_labels = header, alignment, formatters= [ summary_formatter (df)] , highlighters= collect (highlighters), fit_table_in_display_horizontally = ( crop== :horizontal ), fit_table_in_display_vertically = false )
10291030 end
10301031 end
10311032
0 commit comments