print times
This commit is contained in:
parent
c7884f3605
commit
2245ef1ba2
@ -4,6 +4,7 @@ import java.util.*;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path ;
|
||||
import java.nio.file.Paths;
|
||||
import java.time.*;
|
||||
|
||||
public class jrunner {
|
||||
//static final String QUERY = "SELECT * from rlarp.osm LIMIT 100";
|
||||
@ -34,6 +35,8 @@ public class jrunner {
|
||||
String[] getv = null;
|
||||
Integer cols = null;
|
||||
String[] dtn = null;
|
||||
Timestamp tsStart = null;
|
||||
Timestamp tsEnd = null;
|
||||
|
||||
msg = "jrunner version 0.37";
|
||||
msg = msg + nl + "-scu source jdbc url";
|
||||
@ -60,6 +63,7 @@ public class jrunner {
|
||||
scn = args[i+1];
|
||||
break;
|
||||
//source password
|
||||
//import java.time.*;
|
||||
case "-scp":
|
||||
scp = args[i+1];
|
||||
break;
|
||||
@ -162,6 +166,8 @@ public class jrunner {
|
||||
try {
|
||||
stmt = scon.createStatement();
|
||||
stmt.setFetchSize(10000);
|
||||
tsStart = Timestamp.from(Instant.now());
|
||||
System.out.println(tsStart);
|
||||
rs = stmt.executeQuery(sq);
|
||||
//while (rs.next()) {
|
||||
// System.out.println(rs.getString("x"));
|
||||
@ -329,6 +335,11 @@ public class jrunner {
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println(" rows written");
|
||||
System.out.println("");
|
||||
tsEnd = Timestamp.from(Instant.now());
|
||||
System.out.println(tsStart);
|
||||
System.out.println(tsEnd);
|
||||
//long time = Duration.between(tsStart, tsEnd).toMillis();
|
||||
//System.out.println("time elapsed: " + time);
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user