File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,10 @@ pub struct BenchmarkConfig {
78
78
excluded_scenarios : HashSet < Scenario > ,
79
79
80
80
artifact : ArtifactType ,
81
+
82
+ /// Which package from a workspace should be compiled
83
+ #[ serde( default ) ]
84
+ package : Option < String > ,
81
85
}
82
86
83
87
impl BenchmarkConfig {
@@ -224,6 +228,7 @@ impl Benchmark {
224
228
touch_file : self . config . touch_file . clone ( ) ,
225
229
jobserver : None ,
226
230
target,
231
+ workspace_package : self . config . package . clone ( ) ,
227
232
}
228
233
}
229
234
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ pub struct CargoProcess<'a> {
131
131
pub touch_file : Option < String > ,
132
132
pub jobserver : Option < jobserver:: Client > ,
133
133
pub target : Target ,
134
+ pub workspace_package : Option < String > ,
134
135
}
135
136
/// Returns an optional list of Performance CPU cores, if the system has P and E cores.
136
137
/// This list *should* be in a format suitable for the `taskset` command.
@@ -258,6 +259,10 @@ impl<'a> CargoProcess<'a> {
258
259
259
260
fn get_pkgid ( & self , cwd : & Path ) -> anyhow:: Result < String > {
260
261
let mut pkgid_cmd = self . base_command ( cwd, "pkgid" ) ;
262
+ if let Some ( package) = & self . workspace_package {
263
+ pkgid_cmd. arg ( "-p" ) . arg ( package) ;
264
+ }
265
+
261
266
let out = command_output ( & mut pkgid_cmd)
262
267
. with_context ( || format ! ( "failed to obtain pkgid in '{:?}'" , cwd) ) ?
263
268
. stdout ;
You can’t perform that action at this time.
0 commit comments