11use crate :: gas:: stats:: GasStats ;
22use cheatnet:: trace_data:: { CallTrace , CallTraceNode } ;
33use comfy_table:: modifiers:: UTF8_ROUND_CORNERS ;
4- use comfy_table:: { Cell , Color , Table } ;
4+ use comfy_table:: { Attribute , Cell , Color , Table } ;
55use debugging:: ContractsDataStore ;
66use starknet_api:: core:: { ClassHash , EntryPointSelector } ;
77use starknet_api:: execution_resources:: GasVector ;
@@ -142,12 +142,12 @@ pub fn format_table_output(contract_info: &ContractInfo, name: &ContractName) ->
142142 Cell :: new( format!( "{name} Contract" ) ) . fg( Color :: Magenta ) ,
143143 ] ) ;
144144 table. add_row ( vec ! [
145- Cell :: new( "Function Name" ) ,
146- Cell :: new( "Min" ) . fg ( Color :: Green ) ,
147- Cell :: new( "Max" ) . fg ( Color :: Red ) ,
148- Cell :: new( "Avg" ) . fg ( Color :: Yellow ) ,
149- Cell :: new( "Std Dev" ) . fg ( Color :: Yellow ) ,
150- Cell :: new( "# Calls" ) . fg ( Color :: Cyan ) ,
145+ Cell :: new( "Function Name" ) . add_attribute ( Attribute :: Bold ) ,
146+ Cell :: new( "Min" ) . add_attribute ( Attribute :: Bold ) ,
147+ Cell :: new( "Max" ) . add_attribute ( Attribute :: Bold ) ,
148+ Cell :: new( "Avg" ) . add_attribute ( Attribute :: Bold ) ,
149+ Cell :: new( "Std Dev" ) . add_attribute ( Attribute :: Bold ) ,
150+ Cell :: new( "# Calls" ) . add_attribute ( Attribute :: Bold ) ,
151151 ] ) ;
152152
153153 contract_info
@@ -156,11 +156,10 @@ pub fn format_table_output(contract_info: &ContractInfo, name: &ContractName) ->
156156 . for_each ( |( selector, report_data) | {
157157 table. add_row ( vec ! [
158158 Cell :: new( selector) ,
159- Cell :: new( report_data. gas_stats. min. to_string( ) ) . fg( Color :: Green ) ,
160- Cell :: new( report_data. gas_stats. max. to_string( ) ) . fg( Color :: Red ) ,
161- Cell :: new( report_data. gas_stats. mean. round( ) . to_string( ) ) . fg( Color :: Yellow ) ,
162- Cell :: new( report_data. gas_stats. std_deviation. round( ) . to_string( ) )
163- . fg( Color :: Yellow ) ,
159+ Cell :: new( report_data. gas_stats. min. to_string( ) ) ,
160+ Cell :: new( report_data. gas_stats. max. to_string( ) ) ,
161+ Cell :: new( report_data. gas_stats. mean. round( ) . to_string( ) ) ,
162+ Cell :: new( report_data. gas_stats. std_deviation. round( ) . to_string( ) ) ,
164163 Cell :: new( report_data. n_calls. to_string( ) ) ,
165164 ] ) ;
166165 } ) ;
0 commit comments