// Path: trunk/src/main/java/jalen/sensors/cpu/CPUSensorsInterface.java
// public interface CPUSensorsInterface {
// 
// 	/**
// 	 * Calculate percentage of CPU usage for PID
// 	 * @return the percentage of CPU usage by PID
// 	 */
// 	double getProcessCPUUsagePercentage();
// 
// 	/**
// 	 * Calculate CPU time for each frequency
// 	 * @return Map of CPU frequencies and the CPU time spend for each
// 	 */
// 	Map<Double, Double> getTimeInFrequencies();
// 
// }


import jalen.sensors.cpu.CPUSensorsInterface;
import java.util.HashMap;
import java.util.Map;
/*
 * Copyright (c) 2014, Inria, University Lille 1.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Affero General Public License v3.0
 * which accompanies this distribution, and is available at
 * https://www.gnu.org/licenses/agpl-3.0.html
 *
 * Author : Adel Noureddine
 */

package jalen.formulas.cpu;



public class CPUFormulaDVFS implements CPUFormulasInterface {

	/**
	 * Thermal Design Power of the CPU (given by constructors)
	 */
	private double TDP;

	/**
	 * TDP factor for CMOS formula
	 * By default, it is at 0.7
	 */
	private double TDPFactor = 0.7;

	/**
	 * The CPU sensor used to collect data from the CPU
	 */
// Path: trunk/src/main/java/jalen/sensors/cpu/CPUSensorsInterface.java
// public interface CPUSensorsInterface {
// 
// 	/**
// 	 * Calculate percentage of CPU usage for PID
// 	 * @return the percentage of CPU usage by PID
// 	 */
// 	double getProcessCPUUsagePercentage();
// 
// 	/**
// 	 * Calculate CPU time for each frequency
// 	 * @return Map of CPU frequencies and the CPU time spend for each
// 	 */
// 	Map<Double, Double> getTimeInFrequencies();
// 
// }


// Path: trunk/src/main/java/jalen/formulas/cpu/CPUFormulaDVFS.java
import jalen.sensors.cpu.CPUSensorsInterface;
import java.util.HashMap;
import java.util.Map;

/*
 * Copyright (c) 2014, Inria, University Lille 1.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Affero General Public License v3.0
 * which accompanies this distribution, and is available at
 * https://www.gnu.org/licenses/agpl-3.0.html
 *
 * Author : Adel Noureddine
 */

package jalen.formulas.cpu;



public class CPUFormulaDVFS implements CPUFormulasInterface {

	/**
	 * Thermal Design Power of the CPU (given by constructors)
	 */
	private double TDP;

	/**
	 * TDP factor for CMOS formula
	 * By default, it is at 0.7
	 */
	private double TDPFactor = 0.7;

	/**
	 * The CPU sensor used to collect data from the CPU
	 */
	private CPUSensorsInterface cpuSensor;