- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.2k
 
Make benchmark setup consistent #16733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            10 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      5d26f56
              
                refactor: organize benches to be consistent
              
              
                BD103 afc8d33
              
                refactor: run rustfmt
              
              
                BD103 d6cdf96
              
                chore: fix several clippy lints
              
              
                BD103 ee94d48
              
                feat: update `black_box()` usage
              
              
                BD103 cbe1688
              
                refactor: make all `criterion_group!`s named `benches`
              
              
                BD103 e701c21
              
                refactor: re-order imports
              
              
                BD103 8815bb7
              
                refactor: uplift `fragmentation/mod.rs` to `fragmentation.rs`
              
              
                BD103 b0065e0
              
                refactor: organize dependencies and bump criterion to 0.5
              
              
                BD103 df26ba2
              
                feat: re-implement `parallel` argument
              
              
                BD103 77c179b
              
                Merge branch 'main' into bench-consistency
              
              
                BD103 File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              This file was deleted.
      
      Oops, something went wrong.
      
    
  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
          
            4 changes: 2 additions & 2 deletions
          
          4 
        
  ...hes/benches/bevy_ecs/fragmentation/mod.rs → benches/benches/bevy_ecs/fragmentation.rs
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was previously running function-reflection-specific benches like:
Does this change mean I won't be able to run specific sets of benches anymore?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but only temporarily! Just like unit tests, you can filter what subset of benchmarks you want to run:
# Will run `typed/function`, `typed/closure`, `typed/closure_mut`, and more. cargo bench --bench reflect -- typedMy plan with #16647 is to rename all benchmarks to include their module paths, so you'll be able to run:
# This is equivalent to `cargo bench --bench reflect_function`, using the new system. cargo bench --bench reflect -- bevy_reflect::functionThis PR was a precursor, since I didn't want to have too many changes at once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to second this, because when I still was putting the stress test , it was very annoying to test just the bench while not testing everything else. Can you still run specific benchmarks (or groups of them) with this reorganization?