/** * The <code>report()</code> method generates a textual report after the simulation is complete. * The text contains a breakdown each procedure called in the program and the corresponding * number of cycles spent in it during program execution. Addionally the number of cycles spent * in sleep mode is provided. */ public void report() { // log current state long cycles = simulator.getState().getCycles() - lastChange; if (cycles > 0) { if (currentMode != null) { // system not sleeping currentMode.cycles += cycles; } else { // system sleeping sleepCycles += cycles; } } // display data TermUtil.printSeparator("Energy breakdown for node " + simulator.getID()); Terminal.printCyan("notation: procedureName@Address: cycles\n"); Iterator it = profiles.iterator(); while (it.hasNext()) { EnergyProfile profile = (EnergyProfile) it.next(); if (profile.cycles > 0) { Terminal.println( " " + profile.location.name + '@' + profile.location.lma_addr + ": " + profile.cycles); } } if (sleepCycles > 0) Terminal.println(" sleeping: " + sleepCycles); Terminal.println(""); }