/[projects]/dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Lookup.java
ViewVC logotype

Diff of /dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Lookup.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2214 by torben, Fri Sep 12 06:42:29 2014 UTC revision 2219 by torben, Fri Sep 12 21:03:06 2014 UTC
# Line 109  public class Lookup { Line 109  public class Lookup {
109                                  Thread.sleep(10);//wait for worker threads                                  Thread.sleep(10);//wait for worker threads
110                          }                          }
111                                                    
112                            db.saveBatch();//Save any unsaved rows
113                            
114                                                    
115                  } catch(Exception e) {                  } catch(Exception e) {
116                          logger.log(Level.WARNING, "Exception during lookup", e);                          logger.log(Level.WARNING, "Exception during lookup", e);
# Line 175  public class Lookup { Line 177  public class Lookup {
177                                    
178                                    
179                                    
                   
180                  File confFile = new File( CONFIG_FILENAME );                  File confFile = new File( CONFIG_FILENAME );
181                  if (! confFile.exists() ) {                  if (! confFile.exists() ) {
182                          logger.warning("Config file not found: " + CONFIG_FILENAME);                          logger.warning("Config file not found: " + CONFIG_FILENAME);
# Line 235  public class Lookup { Line 236  public class Lookup {
236                  }                  }
237                                    
238                  long now = System.currentTimeMillis();                  long now = System.currentTimeMillis();
239                    long elapsed = now - start ;
240    
241                  logger.info("Flest Ikke-dækkede, " + flestIkkeDaekkede);                  logger.info("Flest Ikke-dækkede, " + flestIkkeDaekkede);
242                  logger.info("Flest Dækkede, " + flestDaekkede);                  logger.info("Flest Dækkede, " + flestDaekkede);
243                  logger.info("Fuld load done : " + (now-start) );                  logger.info("Fuld load done : " + formatMilliSeconds(elapsed) );
244    
245                                    
246                  /*                  /*
# Line 247  public class Lookup { Line 249  public class Lookup {
249                  Lookup lookup = new Lookup(2750, db);                  Lookup lookup = new Lookup(2750, db);
250                  lookup.doLookup();                                lookup.doLookup();              
251                  long now = System.currentTimeMillis();                  long now = System.currentTimeMillis();
252                  logger.info("Fuld load done : " + (now-start) );*/                  long elapsed = now - start ;
253                    logger.info("Fuld load done : " + formatMilliSeconds(elapsed) );*/
254            }
255            
256            static String formatMilliSeconds(long milliseconds) {
257                    int mseconds = (int) milliseconds % 1000;
258                    int seconds = (int) (milliseconds / 1000) % 60 ;
259                    int minutes = (int) ((milliseconds / (1000*60)) % 60);
260                    int hours   = (int) ((milliseconds / (1000*60*60)) % 24);
261                    
262                    return String.format("%02d:%02d:%02d.%03d", hours, minutes, seconds, mseconds);
263          }          }
264                                    
265  }  }

Legend:
Removed from v.2214  
changed lines
  Added in v.2219

  ViewVC Help
Powered by ViewVC 1.1.20