mirror of
				https://github.com/taigrr/bitcask
				synced 2025-01-18 04:03:17 -08:00 
			
		
		
		
	'make bench' excluded the effect of test on the results (#205)
* Refactored Save function for config * Refactored Save function for config * 'make bench' excluded the effect of test on the results
This commit is contained in:
		
							parent
							
								
									cbbe36f0ae
								
							
						
					
					
						commit
						4f823851e2
					
				
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @ -37,7 +37,7 @@ profile: build | ||||
| 	@go test -cpuprofile cpu.prof -memprofile mem.prof -v -bench . | ||||
| 
 | ||||
| bench: build | ||||
| 	@go test -v -benchmem -bench=. . | ||||
| 	@go test -v -run=XXX -benchmem -bench=. . | ||||
| 
 | ||||
| mocks: | ||||
| 	@mockery -all -case underscore -output ./internal/mocks -recursive | ||||
|  | ||||
| @ -12,9 +12,9 @@ import ( | ||||
| const testLockPath = "/tmp/bitcask_unit_test_lock" // file path to use for the lock | ||||
| 
 | ||||
| func TestTryLock(t *testing.T) { | ||||
| 	// test that basic locking functionnalities are consistent | ||||
| 	// test that basic locking functionalities are consistent | ||||
| 
 | ||||
| 	// make sure there is no present lock when startng this test | ||||
| 	// make sure there is no present lock when starting this test | ||||
| 	os.Remove(testLockPath) | ||||
| 
 | ||||
| 	assert := assert.New(t) | ||||
| @ -48,7 +48,7 @@ func TestTryLock(t *testing.T) { | ||||
| func TestLock(t *testing.T) { | ||||
| 	assert := assert.New(t) | ||||
| 
 | ||||
| 	// make sure there is no present lock when startng this test | ||||
| 	// make sure there is no present lock when starting this test | ||||
| 	os.Remove(testLockPath) | ||||
| 
 | ||||
| 	syncChan := make(chan bool) | ||||
| @ -96,7 +96,7 @@ func TestErrorConditions(t *testing.T) { | ||||
| 	// -- setup | ||||
| 	assert := assert.New(t) | ||||
| 
 | ||||
| 	// make sure there is no present lock when startng this test | ||||
| 	// make sure there is no present lock when starting this test | ||||
| 	os.Remove(testLockPath) | ||||
| 
 | ||||
| 	lock := New(testLockPath) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user