mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-04 07:11:10 +00:00 
			
		
		
		
	* optimized functions for inlining * added note regarding ResponseWriterWrapper * optimzed browseWrite* methods for FileServer * created benchmarks for comparison * creating browseListing instance in each function * created benchmarks for openResponseWriter * removed benchmarks of old implementations * implemented sync.Pool for byte buffers * using global sync.Pool for writing JSON/HTML
		
			
				
	
	
		
			12 lines
		
	
	
	
		
			179 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
	
		
			179 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package encode
 | 
						|
 | 
						|
import (
 | 
						|
	"testing"
 | 
						|
)
 | 
						|
 | 
						|
func BenchmarkOpenResponseWriter(b *testing.B) {
 | 
						|
	enc := new(Encode)
 | 
						|
	for n := 0; n < b.N; n++ {
 | 
						|
		enc.openResponseWriter("test", nil)
 | 
						|
	}
 | 
						|
}
 |