[104] | 1 | package simulator.stats; |
---|
| 2 | |
---|
| 3 | import java.io.IOException; |
---|
| 4 | import java.io.PrintStream; |
---|
| 5 | import java.util.List; |
---|
| 6 | import java.util.Map; |
---|
| 7 | |
---|
| 8 | import schedframe.scheduling.JobInterface; |
---|
| 9 | import simulator.AbstractGridBroker; |
---|
| 10 | import simulator.GenericUser; |
---|
| 11 | import eduni.simjava.Sim_stat; |
---|
| 12 | import gridsim.gssim.ResourceUnitsManagerImpl; |
---|
| 13 | import gridsim.gssim.resource.AbstractComputingResource; |
---|
| 14 | |
---|
| 15 | /** |
---|
| 16 | * TODO |
---|
| 17 | * @author Stanislaw Szczepanowski & Slawomir Bak |
---|
| 18 | * |
---|
| 19 | */ |
---|
| 20 | public interface SimulationStatisticsOld { |
---|
| 21 | |
---|
| 22 | /** |
---|
| 23 | * the mean job waiting time statistics |
---|
| 24 | */ |
---|
| 25 | public static final String TASK_WAITING_TIME = "Task waiting time"; |
---|
| 26 | |
---|
| 27 | /** |
---|
| 28 | * the makespan of all tasks in this simulation |
---|
| 29 | */ |
---|
| 30 | public static final String MAKESPAN = "Makespan"; |
---|
| 31 | |
---|
| 32 | public static final String TASK_COMPLETION_TIME = "Task completion time"; |
---|
| 33 | |
---|
| 34 | public static final String DELAYED_TASKS = "Delayed tasks"; |
---|
| 35 | |
---|
| 36 | public static final String TASK_TARDINESS = "Task tardiness"; |
---|
| 37 | |
---|
| 38 | public static final String TASK_LATENESS = "Task lateness"; |
---|
| 39 | |
---|
| 40 | public static final String TASK_FLOW_TIME = "Task flow time"; |
---|
| 41 | |
---|
| 42 | /** |
---|
| 43 | * the mean job execution time statistics name |
---|
| 44 | */ |
---|
| 45 | public static final String TASK_EXECUTION_TIME = "Task execution time"; |
---|
| 46 | |
---|
| 47 | /** |
---|
| 48 | * the failed requests (unfinished tasks count) statistics name |
---|
| 49 | */ |
---|
| 50 | public static final String FAILED_REQUESTS = "Failed requests (tasks)"; |
---|
| 51 | |
---|
| 52 | public static String[] TASK_STATISTICS_NAMES = { |
---|
| 53 | MAKESPAN, |
---|
| 54 | DELAYED_TASKS, |
---|
| 55 | FAILED_REQUESTS, |
---|
| 56 | TASK_WAITING_TIME, |
---|
| 57 | TASK_COMPLETION_TIME, |
---|
| 58 | TASK_TARDINESS, |
---|
| 59 | TASK_LATENESS, |
---|
| 60 | TASK_FLOW_TIME, |
---|
| 61 | TASK_EXECUTION_TIME, |
---|
| 62 | }; |
---|
| 63 | |
---|
| 64 | /**/ |
---|
| 65 | |
---|
| 66 | /** |
---|
| 67 | * Stores the total load of all resources |
---|
| 68 | */ |
---|
| 69 | public static final String RESOURCES_TOTAL_LOAD = "Resources total load"; |
---|
| 70 | |
---|
| 71 | /** |
---|
| 72 | * Stores the total load of all resources |
---|
| 73 | */ |
---|
| 74 | public static final String RESOURCES_RESERVATION_LOAD = "Resources reservation load"; |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | /** |
---|
| 78 | * Stores the mean resources queue length |
---|
| 79 | */ |
---|
| 80 | public static final String RESOURCES_QUEUE_LENGTH = "Resources queue length"; |
---|
| 81 | |
---|
| 82 | public static String[] RESOURCES_STATISTICS_NAMES = { |
---|
| 83 | RESOURCES_TOTAL_LOAD, |
---|
| 84 | RESOURCES_QUEUE_LENGTH, |
---|
| 85 | }; |
---|
| 86 | /* ******************************************************************* */ |
---|
| 87 | |
---|
| 88 | public void gatherStatistics(GenericUser users, |
---|
| 89 | AbstractGridBroker brokerInterface, |
---|
| 90 | AbstractComputingResource gridResources[]); |
---|
| 91 | |
---|
| 92 | /** |
---|
| 93 | * Prints the detailed data for every entity, task |
---|
| 94 | * @param out the print writer to write the data to |
---|
| 95 | */ |
---|
| 96 | public void printSimulationStatistics(PrintStream out) throws IOException; |
---|
| 97 | |
---|
| 98 | public void printTasksInformation(PrintStream out, boolean printHistory) throws IOException; |
---|
| 99 | |
---|
| 100 | public void printResourcesInformation(PrintStream out) throws IOException; |
---|
| 101 | |
---|
| 102 | public boolean saveGanntsDiagrams(String path, String filenamePrefix); |
---|
| 103 | |
---|
| 104 | public void addStats(String name, GSSAccumulator value); |
---|
| 105 | |
---|
| 106 | public GSSAccumulator getStats(String name); |
---|
| 107 | |
---|
| 108 | /** |
---|
| 109 | * @return true, if all tasks sent by the users were completely finished before returning them to users |
---|
| 110 | */ |
---|
| 111 | public boolean areAllTasksFinished(); |
---|
| 112 | |
---|
| 113 | /** |
---|
| 114 | * The number of generated tasks in simulation this object represents |
---|
| 115 | * @return the generatedTaskCount |
---|
| 116 | */ |
---|
| 117 | public int getGeneratedTaskCount(); |
---|
| 118 | |
---|
| 119 | public int getReceivedTaskCount(); |
---|
| 120 | |
---|
| 121 | public int getGeneratedJobCount(); |
---|
| 122 | |
---|
| 123 | public int getReceivedJobCount(); |
---|
| 124 | |
---|
| 125 | public List<JobInterface<?>> getReceivedJobs(); |
---|
| 126 | |
---|
| 127 | public Map<String, List<schedframe.scheduling.Reservation>> getResourcesReservations(); |
---|
| 128 | |
---|
| 129 | public Map<String, List<schedframe.scheduling.Reservation>> getBrokersReservations(); |
---|
| 130 | |
---|
| 131 | public ResourceUnitsManagerImpl getResourcesCharacteristics(String resourceName); |
---|
| 132 | |
---|
| 133 | public Sim_stat getBrokerStats(); |
---|
| 134 | |
---|
| 135 | /** |
---|
| 136 | * Indicates, whether any user entity created in the simulation has encountered an error. An error can be: |
---|
| 137 | * received the same job twice. |
---|
| 138 | * @return <code>true</code> if any error occurred. |
---|
| 139 | */ |
---|
| 140 | public boolean isUsersError(); |
---|
| 141 | |
---|
| 142 | public void setGenPEdiagram(boolean arg); |
---|
| 143 | } |
---|