Changeset 1886


Ignore:
Timestamp:
03/05/15 11:35:47 (10 years ago)
Author:
pharms
Message:
  • added some further information to task statistics
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-ui-core/src/main/java/de/ugoe/cs/autoquest/commands/usability/CMDtaskTreeStatistics.java

    r1769 r1886  
    2323import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
    2424import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance; 
     25import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration; 
     26import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional; 
     27import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection; 
     28import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence; 
    2529import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    2630import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance; 
     
    8387        int allEvents = 0; 
    8488         
     89        int noOfEventTasks = 0; 
     90        int noOfSequences = 0; 
     91        int noOfIterations = 0; 
     92        int noOfSelections = 0; 
     93        int noOfOptionals = 0; 
     94         
    8595        for (ITask task : taskModel.getTasks()) { 
    8696            int covQuant = 
     
    93103             
    94104            if (task instanceof IEventTask) { 
     105                noOfEventTasks++; 
    95106                allEvents += task.getInstances().size(); 
     107            } 
     108            else if (task instanceof ISequence) { 
     109                noOfSequences++; 
     110            } 
     111            else if (task instanceof IIteration) { 
     112                noOfIterations++; 
     113            } 
     114            else if (task instanceof ISelection) { 
     115                noOfSelections++; 
     116            } 
     117            else if (task instanceof IOptional) { 
     118                noOfOptionals++; 
    96119            } 
    97120        } 
    98121         
     122        Console.println(noOfEventTasks + " eventTasks, " + noOfSequences + " sequences, " + 
     123                        noOfIterations + " iterations, " + noOfSelections + " selections, " + 
     124                        noOfOptionals + " optionals"); 
    99125        Console.println(taskCount + " of " + allTasks + " tasks (" + (taskCount * 100 / allTasks) + 
    100126                        "%) covered " + coveredEvents.size() + " of " + allEvents + 
Note: See TracChangeset for help on using the changeset viewer.