Changeset 247 for trunk/benchmarking

Show
Ignore:
Timestamp:
11/05/09 17:20:52 (3 years ago)
Author:
martijn
Message:

Refactoring of Biomart to get rid of all the map-in-map's.
Fixed biomart to comply with basic test.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/benchmarking/test/org/bridgedb/benchmarking/Base.java

    r226 r247  
    9797                } 
    9898                 
    99                 // test mapping single id 
    100                 start = System.currentTimeMillis(); 
    101                 Set<Xref> result2 = mapper.mapID(from); 
    102                 end = System.currentTimeMillis(); delta = end - start; 
    103                 measure.add("Benchmark::" + name + "::mapID(Xref)", "" + delta, "msec"); 
     99                try 
     100                { 
     101                        // test mapping single id 
     102                        start = System.currentTimeMillis(); 
     103                        Set<Xref> result2 = mapper.mapID(from); 
     104                        end = System.currentTimeMillis(); delta = end - start; 
     105                        measure.add("Benchmark::" + name + "::mapID(Xref)", "" + delta, "msec"); 
     106                         
     107                        assertTrue (result2.contains(to)); 
     108                        assertNotNull (mapper.mapID(NONEXISTENT)); 
     109                } 
     110                catch (UnsupportedOperationException ex) 
     111                { 
     112                        // at least for idmapper-biomart, zero target DataSources is not supported  
     113                } 
    104114                 
    105                 assertTrue (result2.contains(to)); 
    106                 assertNotNull (mapper.mapID(NONEXISTENT)); 
    107115                assertTrue (mapper.mapID(from, to.getDataSource()).contains(to)); 
    108116