@@ -73,14 +73,18 @@ fn benchmark_simple_raytracer(dirs: &Dirs, bootstrap_host_compiler: &Compiler) {
73
73
1 ,
74
74
bench_runs,
75
75
Some ( & clean_cmd) ,
76
- & [ & llvm_build_cmd, & clif_build_cmd, & clif_build_opt_cmd] ,
76
+ & [
77
+ ( "cargo build" , & llvm_build_cmd) ,
78
+ ( "cargo-clif build" , & clif_build_cmd) ,
79
+ ( "cargo-clif build --release" , & clif_build_opt_cmd) ,
80
+ ] ,
77
81
& bench_compile_markdown,
78
82
) ;
79
83
80
84
spawn_and_wait ( bench_compile) ;
81
85
82
86
if let Some ( gha_step_summary) = gha_step_summary. as_mut ( ) {
83
- gha_step_summary. write_all ( b"# Compilation \n \n " ) . unwrap ( ) ;
87
+ gha_step_summary. write_all ( b"## Compile ebobby/simple-raytracer \n \n " ) . unwrap ( ) ;
84
88
gha_step_summary. write_all ( & std:: fs:: read ( bench_compile_markdown) . unwrap ( ) ) . unwrap ( ) ;
85
89
gha_step_summary. write_all ( b"\n " ) . unwrap ( ) ;
86
90
}
@@ -89,31 +93,37 @@ fn benchmark_simple_raytracer(dirs: &Dirs, bootstrap_host_compiler: &Compiler) {
89
93
90
94
let bench_run_markdown = RelPath :: DIST . to_path ( dirs) . join ( "bench_run.md" ) ;
91
95
96
+ let raytracer_cg_llvm = Path :: new ( "." ) . join ( get_file_name (
97
+ & bootstrap_host_compiler. rustc ,
98
+ "raytracer_cg_llvm" ,
99
+ "bin" ,
100
+ ) ) ;
101
+ let raytracer_cg_clif = Path :: new ( "." ) . join ( get_file_name (
102
+ & bootstrap_host_compiler. rustc ,
103
+ "raytracer_cg_clif" ,
104
+ "bin" ,
105
+ ) ) ;
106
+ let raytracer_cg_clif_opt = Path :: new ( "." ) . join ( get_file_name (
107
+ & bootstrap_host_compiler. rustc ,
108
+ "raytracer_cg_clif_opt" ,
109
+ "bin" ,
110
+ ) ) ;
92
111
let mut bench_run = hyperfine_command (
93
112
0 ,
94
113
bench_runs,
95
114
None ,
96
115
& [
97
- Path :: new ( "." )
98
- . join ( get_file_name ( & bootstrap_host_compiler. rustc , "raytracer_cg_llvm" , "bin" ) )
99
- . to_str ( )
100
- . unwrap ( ) ,
101
- Path :: new ( "." )
102
- . join ( get_file_name ( & bootstrap_host_compiler. rustc , "raytracer_cg_clif" , "bin" ) )
103
- . to_str ( )
104
- . unwrap ( ) ,
105
- Path :: new ( "." )
106
- . join ( get_file_name ( & bootstrap_host_compiler. rustc , "raytracer_cg_clif_opt" , "bin" ) )
107
- . to_str ( )
108
- . unwrap ( ) ,
116
+ ( "" , raytracer_cg_llvm. to_str ( ) . unwrap ( ) ) ,
117
+ ( "" , raytracer_cg_clif. to_str ( ) . unwrap ( ) ) ,
118
+ ( "" , raytracer_cg_clif_opt. to_str ( ) . unwrap ( ) ) ,
109
119
] ,
110
120
& bench_run_markdown,
111
121
) ;
112
122
bench_run. current_dir ( RelPath :: BUILD . to_path ( dirs) ) ;
113
123
spawn_and_wait ( bench_run) ;
114
124
115
125
if let Some ( gha_step_summary) = gha_step_summary. as_mut ( ) {
116
- gha_step_summary. write_all ( b"# Execution \n \n " ) . unwrap ( ) ;
126
+ gha_step_summary. write_all ( b"## Run ebobby/simple-raytracer \n \n " ) . unwrap ( ) ;
117
127
gha_step_summary. write_all ( & std:: fs:: read ( bench_run_markdown) . unwrap ( ) ) . unwrap ( ) ;
118
128
gha_step_summary. write_all ( b"\n " ) . unwrap ( ) ;
119
129
}
0 commit comments