mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote branch 'origin/master'
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
package org.jetbrains.ether;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
* Date: 6/29/12
|
||||
*/
|
||||
public class LogParser {
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
final String logPath = args[0];
|
||||
|
||||
long totalTime = 0L;
|
||||
final BufferedReader reader = new BufferedReader(new FileReader(new File(logPath)));
|
||||
try {
|
||||
String line = reader.readLine();
|
||||
while (line != null) {
|
||||
if (line.contains("incremental.java.JavaBuilder - Compiling")) {
|
||||
final long startTime = getTime(line);
|
||||
final String nextLine = reader.readLine();
|
||||
if (nextLine != null && nextLine.contains("- Dependency analysis found")) {
|
||||
final long endTime = getTime(nextLine);
|
||||
totalTime += (endTime - startTime);
|
||||
}
|
||||
}
|
||||
line = reader.readLine();
|
||||
}
|
||||
}
|
||||
finally {
|
||||
reader.close();
|
||||
}
|
||||
|
||||
long millis = totalTime % 1000;
|
||||
long seconds = totalTime / 1000;
|
||||
long minutes = seconds / 60;
|
||||
seconds = seconds % 60;
|
||||
|
||||
System.out.println("Total time spent compiling java " + minutes + " min " + seconds + " sec " + millis + " ms");
|
||||
}
|
||||
|
||||
|
||||
private static final int HOURS_START = 11;
|
||||
private static final int MINUTES_START = HOURS_START + 3;
|
||||
private static final int SECONDS_START = MINUTES_START + 3;
|
||||
private static final int MILLIS_START = SECONDS_START + 3;
|
||||
|
||||
private static long getTime(String line) {
|
||||
final int hours = Integer.parseInt(line.substring(HOURS_START, HOURS_START + 2));
|
||||
final int minutes = Integer.parseInt(line.substring(MINUTES_START, MINUTES_START + 2));
|
||||
final int seconds = Integer.parseInt(line.substring(SECONDS_START, SECONDS_START + 2));
|
||||
final int millis = Integer.parseInt(line.substring(MILLIS_START, MILLIS_START + 3));
|
||||
return millis + seconds * 1000 + minutes * 60000 + hours * 3600000;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -458,7 +458,7 @@ action.HippieBackwardCompletion.text=Cyclic _Expand Word (Backward)
|
||||
action.HippieBackwardCompletion.description=Cyclic Expand word (Backward)
|
||||
action.SmartTypeCompletion.text=_SmartType
|
||||
action.SmartTypeCompletion.description=Complete code basing on expected type
|
||||
action.ClassNameCompletion.text=Class _Name
|
||||
action.ClassNameCompletion.text=Class _Name Completion
|
||||
action.ClassNameCompletion.description=Complete class name and add import for it
|
||||
action.InsertLiveTemplate.text=Insert Live _Template...
|
||||
action.InsertLiveTemplate.description=Show popup list of live templates starting with the specified prefix
|
||||
|
||||
@@ -142,8 +142,8 @@ compiler.process.heap.size.description=Heap size value in MB for the build proce
|
||||
compiler.process.32bit.vm.on.mac=true
|
||||
compiler.process.32bit.vm.on.mac.description=Force -d32 VM option on Mac (recommended for faster startup and lower memory footprint)
|
||||
|
||||
compiler.process.vm.options=
|
||||
compiler.process.vm.options.description=Additional options for compile server's VM
|
||||
compiler.process.vm.options=-Xss2048k
|
||||
compiler.process.vm.options.description=Additional options for the build process' VM
|
||||
|
||||
compiler.process.use.memory.temp.cache=true
|
||||
compiler.process.use.memory.temp.cache.description=Store temporary data in memory for faster compilation; requires larger server heap size
|
||||
|
||||
+3
-5
@@ -27,7 +27,7 @@ import com.intellij.openapi.application.ex.ApplicationEx;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.ex.ProjectEx;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.VirtualFileManager;
|
||||
@@ -55,17 +55,15 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static org.hamcrest.core.Is.is;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assume.assumeThat;
|
||||
|
||||
/**
|
||||
* @author mike
|
||||
*/
|
||||
@RunWith(JMock.class)
|
||||
public class PathMacroManagerTest {
|
||||
private static final String APP_HOME = PathManager.getHomePath();
|
||||
private static final String USER_HOME = StringUtil.trimEnd(SystemProperties.getUserHome(), "/");
|
||||
private static final String APP_HOME = FileUtil.toSystemIndependentName(PathManager.getHomePath());
|
||||
private static final String USER_HOME = FileUtil.toSystemIndependentName(StringUtil.trimEnd(SystemProperties.getUserHome(), "/"));
|
||||
|
||||
private Module myModule;
|
||||
private ProjectEx myProject;
|
||||
|
||||
Reference in New Issue
Block a user