File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ jobs:
105105 with :
106106 command : clippy
107107 args : -- -D warnings
108+ - name : Install dependencies for tools
109+ run : sudo apt-get -y install libfontconfig1-dev jq
110+ - name : Check tools
111+ working-directory : tools
112+ run : cargo clippy -- -D warnings
108113
109114 miri :
110115 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1- /target
2- /Cargo.lock
3- cache_memory_used.png
1+ ** /target
2+ ** /Cargo.lock
3+ ** / cache_memory_used.png
Original file line number Diff line number Diff line change @@ -29,8 +29,6 @@ criterion = "0.7"
2929rand = { version = " 0.9" , features = [" small_rng" ] }
3030rand_distr = " 0.5"
3131tokio = { version = " 1" , features = [" full" ] }
32- memory-stats = { version = " 1.2.0" }
33- plotters = { version = " 0.3" }
3432
3533[[bench ]]
3634name = " benchmarks"
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " memory_used_plot"
3+ version = " 0.1.0"
4+ edition = " 2021"
5+ publish = false
6+
7+ [[bin ]]
8+ name = " memory_used_plot"
9+ path = " src/memory_used_plot.rs"
10+
11+ [dependencies ]
12+ quick_cache = { path = " .." }
13+ memory-stats = " 1.2.0"
14+ plotters = " 0.3"
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ fn main() {
3838 println ! ( "{:?}" , memory_data) ;
3939 memory_datas. push ( memory_data) ;
4040 }
41- let key: Key = ( n as u128 ) . to_le_bytes ( ) . into ( ) ;
41+ let key: Key = ( n as u128 ) . to_le_bytes ( ) ;
4242 cache. insert ( key, ( ) ) ;
4343 }
4444
@@ -62,8 +62,9 @@ fn main() {
6262 let mut chart = ChartBuilder :: on ( & root)
6363 . caption (
6464 format ! (
65- "Memory Used ({})" ,
66- format!( "{}(cap={})" , type_name_of_val( & cache) , cache_capacity)
65+ "Memory Used ({}(cap={}))" ,
66+ type_name_of_val( & cache) ,
67+ cache_capacity
6768 ) ,
6869 ( "sans-serif" , 60 ) ,
6970 )
@@ -104,8 +105,8 @@ fn main() {
104105
105106 chart
106107 . configure_series_labels ( )
107- . background_style ( & WHITE . mix ( 0.8 ) )
108- . border_style ( & BLACK )
108+ . background_style ( WHITE . mix ( 0.8 ) )
109+ . border_style ( BLACK )
109110 . label_font ( ( "sans-serif" , 20 ) )
110111 . legend_area_size ( 60 )
111112 . draw ( )
You can’t perform that action at this time.
0 commit comments