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.
Location:
trunk/CrossPare/src/de/ugoe/cs/cpdp/eval
Files:
2 edited

Legend:

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

    r86 r98  
    4343     * @param productName 
    4444     *            name of the product 
    45      * @return true of the results ofr the given product and experiment are contained in the result 
    46      *         storage 
     45     * @return number of contained resultsfor the given product and experiment 
    4746     */ 
    48     public boolean containsResult(String experimentName, String productName); 
     47    public int containsResult(String experimentName, String productName); 
    4948} 
  • 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.