Advertisement
Guest User

Untitled

a guest
Oct 29th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. public class Server {
  2.    
  3.     private static final String url = "jdbc:postgresql://localhost/test";
  4.     private static final String login = "postgres";
  5.     private static final String password = "12345";
  6.    
  7.     public static void main(String[] args) throws SQLException {
  8.                
  9.         System.out.println("Server is listening");
  10.         While (true){
  11.         long start = System.currentTimeMillis();
  12.         Connection connection = DriverManager.getConnection(url, login, password);
  13.         long end = System.currentTimeMillis();
  14.         System.out.println(end-start);
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement