mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Add benchmarks to create Time instances
This commit is contained in:
		
							parent
							
								
									e802587433
								
							
						
					
					
						commit
						11fd3fec53
					
				
					 2 changed files with 12 additions and 0 deletions
				
			
		
							
								
								
									
										4
									
								
								benchmark/time_new.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								benchmark/time_new.yml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,4 @@
 | 
			
		|||
benchmark:
 | 
			
		||||
  - 'Time.new(2021)'
 | 
			
		||||
  - 'Time.new(2021, 8, 22)'
 | 
			
		||||
  - 'Time.new(2021, 8, 22, in: "+09:00")'
 | 
			
		||||
							
								
								
									
										8
									
								
								benchmark/time_parse.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								benchmark/time_parse.yml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
prelude: |
 | 
			
		||||
  require 'time'
 | 
			
		||||
  inspect = "2021-08-23 09:57:02 +0900"
 | 
			
		||||
  iso8601 = "2021-08-23T09:57:02+09:00"
 | 
			
		||||
benchmark:
 | 
			
		||||
  - Time.iso8601(iso8601)
 | 
			
		||||
  - Time.parse(iso8601)
 | 
			
		||||
  - Time.parse(inspect)
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue