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.Files;
|
||||||
import java.nio.file.Path ;
|
import java.nio.file.Path ;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
|
import java.time.*;
|
||||||
|
|
||||||
public class jrunner {
|
public class jrunner {
|
||||||
//static final String QUERY = "SELECT * from rlarp.osm LIMIT 100";
|
//static final String QUERY = "SELECT * from rlarp.osm LIMIT 100";
|
||||||
@ -34,6 +35,8 @@ public class jrunner {
|
|||||||
String[] getv = null;
|
String[] getv = null;
|
||||||
Integer cols = null;
|
Integer cols = null;
|
||||||
String[] dtn = null;
|
String[] dtn = null;
|
||||||
|
Timestamp tsStart = null;
|
||||||
|
Timestamp tsEnd = null;
|
||||||
|
|
||||||
msg = "jrunner version 0.37";
|
msg = "jrunner version 0.37";
|
||||||
msg = msg + nl + "-scu source jdbc url";
|
msg = msg + nl + "-scu source jdbc url";
|
||||||
@ -60,6 +63,7 @@ public class jrunner {
|
|||||||
scn = args[i+1];
|
scn = args[i+1];
|
||||||
break;
|
break;
|
||||||
//source password
|
//source password
|
||||||
|
//import java.time.*;
|
||||||
case "-scp":
|
case "-scp":
|
||||||
scp = args[i+1];
|
scp = args[i+1];
|
||||||
break;
|
break;
|
||||||
@ -162,6 +166,8 @@ public class jrunner {
|
|||||||
try {
|
try {
|
||||||
stmt = scon.createStatement();
|
stmt = scon.createStatement();
|
||||||
stmt.setFetchSize(10000);
|
stmt.setFetchSize(10000);
|
||||||
|
tsStart = Timestamp.from(Instant.now());
|
||||||
|
System.out.println(tsStart);
|
||||||
rs = stmt.executeQuery(sq);
|
rs = stmt.executeQuery(sq);
|
||||||
//while (rs.next()) {
|
//while (rs.next()) {
|
||||||
// System.out.println(rs.getString("x"));
|
// System.out.println(rs.getString("x"));
|
||||||
@ -329,6 +335,11 @@ public class jrunner {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
System.out.println(" rows written");
|
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