redis测试例子

This commit is contained in:
shuzheng 2016-11-26 23:50:38 +08:00
parent bea04d5d39
commit 970e2c7f5e
1 changed files with 2 additions and 2 deletions

View File

@ -24,11 +24,11 @@ public class RedisController extends BaseController {
@RequestMapping("/test")
@ResponseBody
public Object test(HttpServletRequest request) {
System.out.println(System.getProperty("java.io.tmpdir"));
long time = System.currentTimeMillis();
for (int i = 1; i <= 10000; i ++) {
RedisUtil.set("key" + i, "value" + i, i * 5);
}
return "success";
return System.currentTimeMillis() - time;
}
/**