Application-level modeling and analysis of time and energy for optimizing power-constrained extreme-scale applications