提交 8de71012 编写于 作者: Y y00314596

add by yangqing3@huawei.com

Signed-off-by: Ny00314596 <yangqing3@huawei.com>
上级 e030bfb7
......@@ -85,7 +85,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_0100--'
+ 'lang: ' + lang
+ ' lang: ' + lang
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -111,7 +111,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_0200--'
+ 'region: ' + region
+ ' region: ' + region
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -137,7 +137,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_0300--'
+ 'locale: ' + locale
+ ' locale: ' + locale
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -163,7 +163,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_1000--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -189,7 +189,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_1100--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -215,7 +215,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_1200--'
+ 'phonenumber: ' + phonenumber
+ ' phonenumber: ' + phonenumber
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -244,7 +244,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_1300--'
+ 'valid: ' + valid
+ ' valid: ' + valid
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -273,7 +273,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_1400--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -299,7 +299,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_1500--'
+ 'calendar: ' + calendar
+ ' calendar: ' + calendar
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -326,7 +326,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_1600--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -353,7 +353,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_1700--'
+ 'name: ' + name
+ ' name: ' + name
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -380,7 +380,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_1800--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -508,7 +508,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_2300--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -560,7 +560,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_2500--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -612,7 +612,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_2700--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -642,7 +642,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_2800--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -668,7 +668,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_2900--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -746,7 +746,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_3200--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -774,7 +774,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_3300--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -802,7 +802,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_3400--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -830,7 +830,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_3500--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -858,7 +858,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_3600--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -886,7 +886,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_3700--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -914,7 +914,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_3800--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -942,7 +942,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_3900--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -994,7 +994,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_4100--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1021,7 +1021,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_4200--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1072,7 +1072,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_4400--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1098,7 +1098,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_4500--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1125,7 +1125,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_4600--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1151,7 +1151,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_4700--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1177,7 +1177,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_4800--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1203,7 +1203,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_4900--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1229,7 +1229,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_5000--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1255,7 +1255,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_5100--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1281,7 +1281,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_5200--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1307,7 +1307,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_5300--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1333,7 +1333,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_5500--'
+ 'value.length: ' + value.length
+ ' value.length: ' + value.length
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1359,7 +1359,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_5600--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 20){
......@@ -1411,7 +1411,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_6000--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1439,7 +1439,7 @@ describe('PerfTest', function () {
let avgTime = exeTime/EXETIME;
let value = locale2.toString();
console.log('perf_test_6100--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1467,7 +1467,7 @@ describe('PerfTest', function () {
let avgTime = exeTime/EXETIME;
let value = locale2.toString();
console.log('perf_test_6200--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1520,7 +1520,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_6400--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1549,7 +1549,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_6500--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1628,7 +1628,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_6800--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1711,7 +1711,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_7100--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1763,7 +1763,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_7300--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1790,7 +1790,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_7400--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1867,7 +1867,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_7700--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1894,7 +1894,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_7800--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -1998,7 +1998,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_8200--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -2025,7 +2025,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_8300--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -2052,7 +2052,7 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_8400--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......@@ -2079,7 +2079,112 @@ describe('PerfTest', function () {
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_8500--'
+ 'value: ' + value
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
expect(true).assertTrue();
}
else{
expect(false).assertTrue();
}
})
/* *
* @tc.number SUB_GLOBAL_PERF_JS_8600
* @tc.name test the performance of getDateOrder
* @tc.desc check the performance of getDateOrder
*/
it('perf_test_8600', 0, function () {
console.log('perf_test_8600 ' + 'start');
let value = 'test';
let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){
value = I18n.Util.getDateOrder('zh');
}
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_8600--'
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
expect(true).assertTrue();
}
else{
expect(false).assertTrue();
}
})
/* *
* @tc.number SUB_GLOBAL_PERF_JS_8700
* @tc.name test the performance of getAvailableIDs
* @tc.desc check the performance of getAvailableIDs
*/
it('perf_test_8700', 0, function () {
console.log('perf_test_8700 ' + 'start');
let value = null;
let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){
value = I18n.Transliterator.getAvailableIDs();
}
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_8700--'
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
expect(true).assertTrue();
}
else{
expect(false).assertTrue();
}
})
/* *
* @tc.number SUB_GLOBAL_PERF_JS_8800
* @tc.name test the performance of getInstance
* @tc.desc check the performance of getInstance
*/
it('perf_test_8800', 0, function () {
console.log('perf_test_8800 ' + 'start');
let value = null;
let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){
value = I18n.Transliterator.getInstance('Any-Latn');
}
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_8800--'
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
expect(true).assertTrue();
}
else{
expect(false).assertTrue();
}
})
/* *
* @tc.number SUB_GLOBAL_PERF_JS_8900
* @tc.name test the performance of transform
* @tc.desc check the performance of transform
*/
it('perf_test_8900', 0, function () {
console.log('perf_test_8900 ' + 'start');
let trans = I18n.Transliterator.getInstance('Any-Latn');
let value = 'test';
let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){
value = trans.transform('中国');
}
let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME;
console.log('perf_test_8900--'
+ ' value: ' + value
+ ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime);
if(avgTime < 10){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册