fix(tvix/eval): Update eval benches for new API
cl/10475 updated the API of tvix_eval::Evaluation, but didn't update this benchmark to use that new API. Also, fixes the docstring to no longer specify that there is a "given snippet". Change-Id: Ibb8285731849dbeec814e2585bbaa36f22368afe Reviewed-on: https://cl.tvl.fyi/c/depot/+/10542 Autosubmit: aspen <root@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
		
							parent
							
								
									5154406ca8
								
							
						
					
					
						commit
						e66dcba195
					
				
					 2 changed files with 2 additions and 3 deletions
				
			
		|  | @ -2,7 +2,7 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; | ||||||
| use itertools::Itertools; | use itertools::Itertools; | ||||||
| 
 | 
 | ||||||
| fn interpret(code: &str) { | fn interpret(code: &str) { | ||||||
|     tvix_eval::Evaluation::new(code, None).evaluate(); |     tvix_eval::Evaluation::default().evaluate(code, None); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| fn eval_literals(c: &mut Criterion) { | fn eval_literals(c: &mut Criterion) { | ||||||
|  |  | ||||||
|  | @ -154,8 +154,7 @@ impl<'co, 'ro> Default for Evaluation<'co, 'ro> { | ||||||
| 
 | 
 | ||||||
| impl<'co, 'ro> Evaluation<'co, 'ro> { | impl<'co, 'ro> Evaluation<'co, 'ro> { | ||||||
|     #[cfg(feature = "impure")] |     #[cfg(feature = "impure")] | ||||||
|     /// Initialise an `Evaluation` for the given snippet, with all
 |     /// Initialise an `Evaluation`, with all impure features turned on by default.
 | ||||||
|     /// impure features turned on by default.
 |  | ||||||
|     pub fn new_impure() -> Self { |     pub fn new_impure() -> Self { | ||||||
|         let mut eval = Self { |         let mut eval = Self { | ||||||
|             enable_import: true, |             enable_import: true, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue