コード例 #1
0
ファイル: contact_test.go プロジェクト: ninnemana/API
func BenchmarkContact(b *testing.B) {
	testThatHttp.RequestBenchmark(b.N, "GET", "/contact/"+randContact(), nil, GetContact)
	testThatHttp.RequestBenchmark(b.N, "GET", "/contact", nil, GetAllContacts)
	testThatHttp.RequestBenchmark(b.N, "GET", "/contact/types/"+randType(), nil, GetContactType)
	testThatHttp.RequestBenchmark(b.N, "GET", "/contact/types", nil, GetAllContactTypes)
	testThatHttp.RequestBenchmark(b.N, "GET", "/contact/types/receivers/"+randType(), nil, GetReceiversByContactType)
	testThatHttp.RequestBenchmark(b.N, "GET", "/contact/reciever/"+randReceiver(), nil, GetContactReceiver)
	testThatHttp.RequestBenchmark(b.N, "GET", "/contact/reciever", nil, GetAllContactReceivers)
}
コード例 #2
0
ファイル: blog_test.go プロジェクト: ninnemana/API
func BenchmarkBlog(b *testing.B) {
	testThatHttp.RequestBenchmark(b.N, "GET", "/blog/1", nil, GetBlog)
	testThatHttp.RequestBenchmark(b.N, "GET", "/blog", nil, GetAll)
	testThatHttp.RequestBenchmark(b.N, "GET", "/blog/categories", nil, GetAllCategories)
	testThatHttp.RequestBenchmark(b.N, "GET", "/blog/category/1", nil, GetBlogCategory)
}
コード例 #3
0
ファイル: brand_test.go プロジェクト: ninnemana/API
func BenchmarkBrands(b *testing.B) {
	testThatHttp.RequestBenchmark(b.N, "GET", "/brand/1", nil, GetBrand)
	testThatHttp.RequestBenchmark(b.N, "GET", "/brand", nil, GetAllBrands)
}
コード例 #4
0
func BenchmarkApplicationGuide(b *testing.B) {
	testThatHttp.RequestBenchmark(b.N, "GET", "/applicationGuide/1", nil, GetApplicationGuide)
	testThatHttp.RequestBenchmark(b.N, "GET", "/applicationGuide/1", nil, GetApplicationGuidesByWebsite)
}