给heapdump文件名增加分隔符

pull/2822/head
zhou.yun 10 months ago
parent 13a8def2e7
commit 7d6a31954e

@ -51,7 +51,7 @@ public class HeapDumpCommand extends AnnotatedCommand {
@Override
public void process(CommandProcess process) {
try {
String dumpFile = file == null ? (process.getArthasOutput().getAbsolutePath()+"heapdump"+System.currentTimeMillis()+".hprof") : null;
String dumpFile = file == null ? (process.getArthasOutput().getAbsolutePath()+File.separator+"heapdump-"+System.currentTimeMillis()+".hprof") : null;
if (dumpFile == null || dumpFile.isEmpty()) {
String date = new SimpleDateFormat("yyyy-MM-dd-HH-mm").format(new Date());
File file = File.createTempFile("heapdump" + date + (live ? "-live" : ""), ".hprof");

Loading…
Cancel
Save