Java???????????????
???????????? ???????[ 2016/6/27 13:56:01 ] ??????????????? Java ????
???????????£???????????????????????????????????а??????????????????????????????????????????????????Ч?????????????????д????????????????????????????????????????????е?Ч????Ч????????????? collection ?????????????????????????????????ε???????????????????????????????塣
public class Test1 {
private volatile double l;
private int nLoops;
private int[] input;
private Test1(int n) {
nLoops = n;
input = new int[nLoops];
Random random = new Random();
for (int i = 0; i < nLoops; i++) {
input[i] = random.nextInt(50);
}
}
public void doTest(boolean isWarmup) {
long then = System.currentTimeMillis();
for (int i = 0; i < nLoops; i++) {
try {
l = compute(input[i]);
} catch (IllegalArgumentException iae) {
}
if (!isWarmup) {
long now = System.currentTimeMillis();
System.out.println("Elapsed time:" + (now - then));
}
}
}
private double compute(int n) {
if (n < 0)
throw new IllegalArgumentException("Must be > 0");
if (n == 0)
return 0d;
if (n == 1)
return 1d;
double d = compute(n - 2) + compute(n - 1);
if (Double.isInfinite(d))
throw new ArithmeticException("Overflow");
return d;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Test1 test1 = new Test1(Integer.parseInt("10");));
test1.doTest(true);
test1.doTest(false);
}
}
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
	
	??????????????????????ó??????????????????????????????ó?????????????????????????????????????????????????????????????????????????????????????????????????????????ó??????????????????
	???????????????????壬??????ó??????????????????÷??????????????????????????????????е?????????????????浽??????????????????????????е???????????????????????????????????????????????????????????????????????????????????????Щ??????飬????????? 200 RPS ?????????????????????????????? 100 RPS????????????????????????????? 100 RPS???????ó??????????????????????κ???????????????????????????????????????????????????????岢?????????????????????????????????????????????????????????????????????????塣
	?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????ж?????????????????????????????????????????????????????????????????????????????????????????????????????????????ι??????????γ?????????????????????????????????????????????????????????????????????????????????????????????????????????ó?????????????????????????????????????????????????????????????
	????????????????????????????????
	????????????е???????????????????????????????????????????????
	????????????????????????????????????????????????????Ч???????????????????????????????????????????????????????????????????????????ó????????????????????????????????????????????????÷??????????????????????????????????????????????ú??????????????????????????潨??????γ?????????
	????????????????????????????????????????????????????????????????????????????????????????????ó???????????????????ζ?????????????????????????κ??????????????????????????????????μ?????????????????????????????????????????????????????????????“Zero-think-time”?????????????£???????????ж??????????????飬??????????ζ????????????п????????????????????????????????????в??????????????????????????????/(TPS)????????? (RPS)???????????? (OPS)??
	???????????л?????????????????ó???????????????????????????????????????????????????????????????????????????????????? CPU ?????????????????????????????????????????????????????????????????£???????????????????????????????????????????????????????????????????????????????????????????????????????????????t??????“Zero-think-time”?????????????п??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????л??漼??????ó???????????????????????????????????????
	???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????У?????????????????????????????????????????“think- time”???????????“think- time”??????????????У??????ζ???????????????????????????????????????????????????????????????£???????????????????????????????????????????ó?????????
	?????????
	??????????????????????????????????????????????β??????????????????????????????????Щ?????????????????е????????????????????Щ??????????????????????????????????д??????Щ????????????????????????? ????????????е????????????????????????????????????????????????仯?????μ????
	???????????????????????????л??????????????????????????????????????????????????????????????????????????????????????????ж????????????????????????費(fèi)?????????????к?????????????????????
	????????????????????????????????????????????????????л???????????????????? 1??
	
	????????????????????????? 25%???????????????????????????????????????? 43%?????? 57%???????????????????43%????? T ???????????????T ?????????????????????С?????? n<30????????????σδ??????????????t ???????? t ????????????????????????????????????????????????????????? z ???顢???????鰱?С?????? T ????????????????????????:??57%?????????????????????????????????? 25%?????????????????? 57%???????????????????????? 25%??????
	???????????????????????????????????????????????????????ж?????????????Щ???????????????????????????????????????????Щ????????????п?????????????δ??????
	????????????????????
	?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????緢???????????????????????????С????????????
	?????????????????????????????У???????????????????????????????????й???????????????????????????????????У?????????????????е????????????????????? Bug????????п?????????????з?????????????????????????????
	?????????????????????2??ò??????????????????????????????????????????????η?壬???????????????????????????????????????? 1%???????????????????????????????????????????????????????????? 20%????????????
	?????κ????????????????????п????????????????????????????????????п????????????????????????????????????????δ???????????????????
	?????????????????????????????????
	???????????????????????????????????????
	?????????????????????y????????
	???????????????????????п?????????????????????????????????
	?????????????????????????????????????????????????
	???????
	???????????????????????????????????????????????????????????????в???????????????????????????????????????????
??????
					
					???·???
App??С????H5?????????????????Щ??
2024/9/11 15:34:34?????????????????????????
2024/9/10 11:13:49P-One ???????????????????????????????????????
2024/9/10 10:14:12???????????????????????????
2024/9/9 18:04:26??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44
					
			
								
								
								
								
								
								
								
								
								
								
				
sales@spasvo.com