File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,14 @@ impl TestGroup {
2323 /// The string `"@global"`, indicating the global test group.
2424 pub const GLOBAL_STR : & ' static str = "@global" ;
2525
26+ /// Returns the custom group name if this is a custom group, or None if this is the global group.
27+ pub fn custom_name ( & self ) -> Option < & str > {
28+ match self {
29+ TestGroup :: Custom ( group) => Some ( group. as_str ( ) ) ,
30+ TestGroup :: Global => None ,
31+ }
32+ }
33+
2634 pub ( crate ) fn make_all_groups (
2735 custom_groups : impl IntoIterator < Item = CustomTestGroup > ,
2836 ) -> impl Iterator < Item = Self > {
Original file line number Diff line number Diff line change @@ -743,6 +743,13 @@ impl<'a> ExecutorContext<'a> {
743743 total_attempts: test. retry_data. total_attempts,
744744 stress_current: test. stress_index. map( |s| s. current) ,
745745 stress_total: test. stress_index. and_then( |s| s. total. map( |t| t. get( ) ) ) ,
746+ global_slot: test. cx. global_slot( ) ,
747+ group_slot: test. cx. group_slot( ) ,
748+ test_group: test
749+ . settings
750+ . test_group( )
751+ . custom_name( )
752+ . map( |s| s. to_owned( ) ) ,
746753 } ) ;
747754
748755 // If assigning the child to the job fails, ignore this. This can happen if the process has
Original file line number Diff line number Diff line change @@ -302,6 +302,15 @@ pub struct UsdtTestAttemptStart {
302302
303303 /// The total number of stress runs, if available.
304304 pub stress_total : Option < u32 > ,
305+
306+ /// The global slot number (0-indexed).
307+ pub global_slot : u64 ,
308+
309+ /// The group slot number (0-indexed), if the test is in a custom test group.
310+ pub group_slot : Option < u64 > ,
311+
312+ /// The test group name, if the test is in a custom test group.
313+ pub test_group : Option < String > ,
305314}
306315
307316/// Data associated with the `test-attempt-done` probe.
You can’t perform that action at this time.
0 commit comments