Esempio n. 1
0
File: main.go Progetto: catgatp/gol
func main() {
	var (
		binaryEDt, fastEDt, gobt testing.BenchmarkResult
		operation_name           string
	)

	operation_name = "Encode"
	binaryEDt = testing.Benchmark(Benchmark_BinaryED_Encode)
	fastEDt = testing.Benchmark(Benchmark_FastED_Encode)
	gobt = testing.Benchmark(Benchmark_gob_Encode)
	fmt.Print(operation_name, "\n", "binaryED:", binaryEDt, binaryEDt.MemString(), "\n", "fastED:", fastEDt, fastEDt.MemString(), "\n", "gob:", gobt, gobt.MemString(), "\n")
	operation_name = "Decode"
	binaryEDt = testing.Benchmark(Benchmark_BinaryED_Decode)
	fastEDt = testing.Benchmark(Benchmark_FastED_Decode)
	gobt = testing.Benchmark(Benchmark_gob_Decode)
	fmt.Print(operation_name, "\n", "binaryED:", binaryEDt, binaryEDt.MemString(), "\n", "fastED:", fastEDt, fastEDt.MemString(), "\n", "gob:", gobt, gobt.MemString(), "\n")

}
Esempio n. 2
0
File: main.go Progetto: catgatp/gol
func main() {
	var (
		std_json, gol_encodejson, gol_encodejsonFast testing.BenchmarkResult
		operation_name                               string
	)

	operation_name = "Encode"
	std_json = testing.Benchmark(Benchmark_std_json)
	gol_encodejson = testing.Benchmark(Benchmark_gol_encodejson)
	gol_encodejsonFast = testing.Benchmark(Benchmark_gol_encodejsonFast)
	fmt.Print(operation_name, "\n", "std_json:", std_json, std_json.MemString(),
		"\n", "gol_encodejson:", gol_encodejson, gol_encodejson.MemString(),
		"\n", "gol_encodejsonFast:", gol_encodejsonFast, gol_encodejsonFast.MemString(), "\n")

}
Esempio n. 3
0
File: main.go Progetto: catgatp/gol
func main() {
	var (
		rcache, rgo_cache testing.BenchmarkResult
		operation_name    string
	)

	operation_name = "Set"
	rcache = testing.Benchmark(Benchmark_cacheSet)
	rgo_cache = testing.Benchmark(Benchmark_gocacheSet)
	fmt.Print(operation_name, "\n", "Cergoo.cache:", rcache, rcache.MemString(), "\n", "go-cache:    ", rgo_cache, rgo_cache.MemString(), "\n")
	operation_name = "Get"
	rcache = testing.Benchmark(Benchmark_cacheGet)
	rgo_cache = testing.Benchmark(Benchmark_gocacheGet)
	fmt.Print(operation_name, "\n", "Cergoo.cache:", rcache, rcache.MemString(), "\n", "go-cache:    ", rgo_cache, rgo_cache.MemString(), "\n")
	operation_name = "Inc"
	rcache = testing.Benchmark(Benchmark_cacheInc)
	rgo_cache = testing.Benchmark(Benchmark_gocacheInc)
	fmt.Print(operation_name, "\n", "Cergoo.cache:", rcache, rcache.MemString(), "\n", "go-cache:    ", rgo_cache, rgo_cache.MemString(), "\n")
}