tools.profiler.sampling: smoke tests and metadata
							parent
							
								
									799053661e
								
							
						
					
					
						commit
						87316ae28f
					
				| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
Joe Groff
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
USING: byte-arrays calendar kernel math memory namespaces
 | 
			
		||||
random threads tools.profiler.sampling
 | 
			
		||||
tools.profiler.sampling.private tools.test ;
 | 
			
		||||
IN: tools.profiler.sampling.tests
 | 
			
		||||
 | 
			
		||||
! Make sure the profiler doesn't blow up the VM
 | 
			
		||||
TUPLE: boom ;
 | 
			
		||||
{ } [ 10 [ [ ] profile ] times ] unit-test
 | 
			
		||||
[ 10 [ [ boom new throw ] profile ] times ] [ boom? ] must-fail-with
 | 
			
		||||
{ } [ 10 [ [ 100 [ 1000 random (byte-array) drop ] times gc ] profile ] times ] unit-test
 | 
			
		||||
{ } [ 2 [ [ 1 seconds sleep ] profile ] times ] unit-test
 | 
			
		||||
 | 
			
		||||
(clear-samples)
 | 
			
		||||
f raw-profile-data set-global
 | 
			
		||||
gc
 | 
			
		||||
| 
						 | 
				
			
			@ -1,3 +1,4 @@
 | 
			
		|||
! (c)2011 Joe Groff bsd license
 | 
			
		||||
USING: assocs calendar continuations kernel math.statistics
 | 
			
		||||
namespaces sequences tools.profiler.sampling.private ;
 | 
			
		||||
IN: tools.profiler.sampling
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
Sampling profiler
 | 
			
		||||
		Loading…
	
		Reference in New Issue