/[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 2219 by torben, Fri Sep 12 21:03:06 2014 UTC revision 2227 by torben, Mon Sep 22 07:39:46 2014 UTC
# Line 37  public class Lookup { Line 37  public class Lookup {
37                    
38          static Statistik flestDaekkede = new Statistik();          static Statistik flestDaekkede = new Statistik();
39          static Statistik flestIkkeDaekkede = new Statistik();          static Statistik flestIkkeDaekkede = new Statistik();
40            static Statistik mestBrugteTid = new Statistik();
41            static Statistik stoersteDataset = new Statistik();
42                    
43                    
44          static class Statistik {          static class Statistik {
45                  int postnr;                  int postnr;
46                  int antalDaekkede = 0;                  int antalDaekkede = 0;
47                  int antalIkkeDaekkede = 0;                  int antalIkkeDaekkede = 0;
48                    int totalDataset = 0;          
49                    long forbrugtTid = 0;
50    
51                                    
52                  @Override                  @Override
53                  public String toString() {                  public String toString() {
54                          return "postnr=" + postnr + " antalIkkeDaekkede=" + antalIkkeDaekkede + " antalDaekkede="  + antalDaekkede;                          return "postnr=" + postnr + " antalIkkeDaekkede=" + antalIkkeDaekkede + " antalDaekkede="  + antalDaekkede + " forbrugtTid=" + forbrugtTid + " totalDataset=" + totalDataset;
55                  }                  }
56          }          }
57                    
# Line 62  public class Lookup { Line 67  public class Lookup {
67                  }                  }
68                  if (stat.antalIkkeDaekkede > flestIkkeDaekkede.antalIkkeDaekkede) {                  if (stat.antalIkkeDaekkede > flestIkkeDaekkede.antalIkkeDaekkede) {
69                          flestIkkeDaekkede = stat;                          flestIkkeDaekkede = stat;
70                  }                                }
71                    
72                    if (stat.totalDataset > mestBrugteTid.totalDataset) {
73                            stoersteDataset = stat;
74                    }
75                    
76                    if (stat.forbrugtTid > mestBrugteTid.forbrugtTid) {
77                            mestBrugteTid = stat;
78                    }
79          }          }
80                    
81          public void doLookup() throws BoundingBoxException {          public void doLookup() throws BoundingBoxException {
# Line 90  public class Lookup { Line 103  public class Lookup {
103                          stat.postnr = postnr;                          stat.postnr = postnr;
104                          stat.antalDaekkede = daekkedeAdresser.length;                          stat.antalDaekkede = daekkedeAdresser.length;
105                          stat.antalIkkeDaekkede = queue.size();                          stat.antalIkkeDaekkede = queue.size();
106                                                    stat.totalDataset = stat.antalDaekkede * stat.antalIkkeDaekkede;
107                          saveStatistics(stat);                                                                          
                                                   
108                                                    
109                          logger.info("Starter beregning for " + postnr);                          logger.info("Starter beregning for " + postnr);
110                          start2 = System.currentTimeMillis();                          start2 = System.currentTimeMillis();
# Line 123  public class Lookup { Line 135  public class Lookup {
135                  }                  }
136                  long now = System.currentTimeMillis();                  long now = System.currentTimeMillis();
137                                    
138                    stat.forbrugtTid = (now-start1);
139                    saveStatistics(stat);
140    
141                  logger.info( stat.toString() );                  logger.info( stat.toString() );
142                  logger.info("Done! elapsed=" + (now-start1) + "/" +  (now-start2) + "  postnr=" + postnr);                  logger.info("Done! elapsed=" + (now-start1) + "/" +  (now-start2) + "  postnr=" + postnr);
# Line 238  public class Lookup { Line 252  public class Lookup {
252                  long now = System.currentTimeMillis();                  long now = System.currentTimeMillis();
253                  long elapsed = now - start ;                  long elapsed = now - start ;
254    
255                    logger.info("Mest brugte tid: " + mestBrugteTid);
256                  logger.info("Flest Ikke-dækkede, " + flestIkkeDaekkede);                  logger.info("Flest Ikke-dækkede, " + flestIkkeDaekkede);
257                  logger.info("Flest Dækkede, " + flestDaekkede);                  logger.info("Flest Dækkede, " + flestDaekkede);
258                    logger.info("Største Dataset, " + stoersteDataset);
259                  logger.info("Fuld load done : " + formatMilliSeconds(elapsed) );                  logger.info("Fuld load done : " + formatMilliSeconds(elapsed) );
260    
261                                    

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

  ViewVC Help
Powered by ViewVC 1.1.20