@Override public void execute(String args[]) throws Exception { try { statHolder.addStat( StatGroups.BYTECODE_OPTIMIZATION, "Total size of all instructions ", CodeAtt.getCodeTotalLengthInput()); super.execute(args); if (!doOptimization) { return; } InputOptionsController.getInstanceOf().execute(); endWithOptimization = true; Oracle.getInstanceOf().updateAllCodeAttsLength(); } catch (Exception d) { d.printStackTrace(); Miscellaneous.exit(); } }
public static double totalReductionPercentage(double reduction) { double totalCodeSize = CodeAtt.getCodeTotalLengthInput(); return ((reduction) / totalCodeSize) * 100.0; }