예제 #1
0
파일: test.go 프로젝트: Grievoushead/GoChat
func (this *TestController) Test() {
	dbRes := db.GetResult()
	this.Data["MongoResult"] = dbRes
	redisRes := redis.GetResult()
	this.Data["RedisResult"] = redisRes

	this.Data["Divide"] = redisRes / dbRes
	this.TplNames = "test.html"
}
예제 #2
0
파일: test.go 프로젝트: Grievoushead/GoChat
func (this *TestController) Test2() {
	dbRes := db.GetResult()
	this.Data["MongoResult"] = dbRes
	redisRes := redis.GetResult()
	this.Data["RedisResult"] = redisRes

	time.Sleep(10000 * time.Millisecond)

	this.Data["Divide"] = redisRes / dbRes
	this.TplNames = "test.html"
}