You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1005 B
36 lines
1005 B
package com.platform.service;
|
|
|
|
import java.util.Date;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
import org.junit.Test;
|
|
|
|
import com.platform.service.impl.ScriptMakeService;
|
|
import com.platform.utils.Configs;
|
|
|
|
public class ScriptMakeServiceTest {
|
|
|
|
ScriptMakeService s = new ScriptMakeService();
|
|
|
|
@Test
|
|
public void findFileTime(){
|
|
Date a = new Date();
|
|
|
|
Map<String, String> sqlFilePathsStandard = new HashMap<String, String>();
|
|
Map<String, String> sqlFilePathsLast = new HashMap<String, String>();
|
|
for (int i = 0; i < 1000; i++) {
|
|
sqlFilePathsLast = s.getAllFile(sqlFilePathsLast,
|
|
Configs.SQL_SCRIPT_PATH_LAST);
|
|
// 遍历 查找 Configs.SQL_SCRIPT_PATH_STANDARD 脚本文件 放入集合中
|
|
sqlFilePathsStandard = s.getAllFile(sqlFilePathsStandard,
|
|
Configs.SQL_SCRIPT_PATH_STANDARD);
|
|
|
|
}
|
|
System.out.println(sqlFilePathsLast.size()+sqlFilePathsStandard.size());
|
|
System.out.println(new Date().getTime() - a.getTime());
|
|
}
|
|
|
|
|
|
}
|