Esempio n. 1
0
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"
}
Esempio n. 2
0
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"
}