Ignore:
Timestamp:
05/13/16 09:18:15 (9 years ago)
Author:
sherbold
Message:
  • added the new configuration parameter repetitions and implemented its usage in the AbstractCrossProjectExperiment?. It now allows for multiple storages of the same result in an IResultContainer to allow for repetitions of experiments with random components.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrossPare/src/de/ugoe/cs/cpdp/eval/MySQLResultStorage.java

    r97 r98  
    162162     */ 
    163163    @Override 
    164     public boolean containsResult(String experimentName, String productName) { 
     164    public int containsResult(String experimentName, String productName) { 
    165165        String sql = "SELECT COUNT(*) as cnt FROM crosspare.results WHERE configurationName=\'" + 
    166166            experimentName + "\' AND productName=\'" + productName + "\';"; 
    167167        Statement stmt; 
    168         boolean contained = false; 
    169168        try { 
    170169            stmt = connectionPool.getConnection().createStatement(); 
    171170            ResultSet results = stmt.executeQuery(sql); 
    172171            results.next(); 
    173             int count = results.getInt("cnt"); 
    174             contained = count > 0; 
     172            return results.getInt("cnt"); 
    175173        } 
    176174        catch (SQLException e) { 
     
    179177            Console.printerr("SQLState: " + e.getSQLState() + "\n"); 
    180178            Console.printerr("VendorError: " + e.getErrorCode() + "\n"); 
    181             Console.printerr("\nskipping product since we could not check if the results is available"); 
    182             contained = true; 
     179            return 0; 
    183180        } 
    184         return contained; 
    185181    } 
    186182} 
Note: See TracChangeset for help on using the changeset viewer.