#562 Limiter DEFAULT_LIMIT optimization
This commit is contained in:
parent
77881396a2
commit
5881214631
@ -42,13 +42,12 @@ public class Limiter {
|
|||||||
/**
|
/**
|
||||||
* qps 5
|
* qps 5
|
||||||
*/
|
*/
|
||||||
private static final String DEFAULT_LIMIT = "5";
|
|
||||||
private static double limit = 5;
|
private static double limit = 5;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
String limitTimeStr = System
|
String limitTimeStr = System
|
||||||
.getProperty("limitTime", DEFAULT_LIMIT);
|
.getProperty("limitTime", String.valueOf(limit));
|
||||||
limit = Double.parseDouble(limitTimeStr);
|
limit = Double.parseDouble(limitTimeStr);
|
||||||
log.info("limitTime:{}", limit);
|
log.info("limitTime:{}", limit);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user