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" }
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" }