forked from powerapi-ng/powerapi-scala
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring(app): change @author tags
Add link to reference email addresses.
- Loading branch information
Showing
36 changed files
with
76 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
/** | ||
* This class is used for binding several functions available on the system or in C. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
@Library("c") | ||
@Runtime(CRuntime.class) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,15 +27,15 @@ import org.powerapi.core.Configuration | |
/** | ||
* Ilde power / Configuration. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait IdlePowerConfiguration { | ||
self: Configuration => | ||
|
||
import org.powerapi.core.ConfigValue | ||
|
||
lazy val idlePower = load { _.getDouble("powerapi.hardware.idle-power") } match { | ||
case ConfigValue(idlePower) => idlePower | ||
case ConfigValue(idle) => idle | ||
case _ => 0d | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ import org.powerapi.core.Configuration | |
/** | ||
* Sampling configuration. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait SamplingConfiguration { | ||
self: Configuration => | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ import org.powerapi.core.Configuration | |
/** | ||
* Timeout configuration. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait TimeoutConfiguration { | ||
self: Configuration => | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ import org.powerapi.core.Configuration | |
/** | ||
* Processor topology. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait TopologyConfiguration { | ||
self: Configuration => | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ import scala.concurrent.duration.{Duration, FiniteDuration} | |
* One child clock is created per frequency. | ||
* Allows to publish a message in the right topics for a given frequency. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
class ClockChild(eventBus: MessageBus, frequency: FiniteDuration) extends ActorComponent { | ||
import org.powerapi.core.ClockChannel.{ClockStart, ClockStop, ClockStopAll, publishClockTick} | ||
|
@@ -91,7 +91,7 @@ class ClockChild(eventBus: MessageBus, frequency: FiniteDuration) extends ActorC | |
* This clock listens the bus on a given topic and reacts on the received message. | ||
* It is responsible to handle a pool of clocks for the monitored frequencies. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
class Clocks(eventBus: MessageBus) extends Supervisor { | ||
import org.powerapi.core.ClockChannel.{ClockStart, ClockStop, ClockStopAll, formatClockChildName, subscribeClockChannel} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ import scala.concurrent.duration.FiniteDuration | |
/** | ||
* Clock channel and messages. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
object ClockChannel extends Channel { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ import scala.concurrent.duration.DurationInt | |
/** | ||
* Base trait for components which use Actor. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait ActorComponent extends Actor with ActorLogging { | ||
/** | ||
|
@@ -43,14 +43,14 @@ trait ActorComponent extends Actor with ActorLogging { | |
/** | ||
* Base trait for API component. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait APIComponent extends ActorComponent | ||
|
||
/** | ||
* Supervisor strategy. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait Supervisor extends ActorComponent { | ||
def handleFailure: PartialFunction[Throwable, Directive] | ||
|
@@ -63,7 +63,7 @@ trait Supervisor extends ActorComponent { | |
* This class is used for defining a default supervisor strategy for the Guardian Actor. | ||
* The Guardian Actor is the main actor used when system.actorOf(...) is used. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
class GuardianFailureStrategy extends SupervisorStrategyConfigurator { | ||
def handleFailure: PartialFunction[Throwable, Directive] = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,15 +32,15 @@ trait ConfigResult[T] | |
/** | ||
* Subtypes to specify the different types of result. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
case class ConfigValue[T](value: T) extends ConfigResult[T] | ||
case class ConfigError[T](exception: Throwable) extends ConfigResult[T] | ||
|
||
/** | ||
* Base trait for dealing with configuration files. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait Configuration { | ||
private lazy val conf = ConfigFactory.load() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,8 @@ package org.powerapi.core | |
|
||
/** | ||
* Base trait for implementing external power meters. | ||
* | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait ExternalPMeter { | ||
def init(): Unit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ import scala.io.Source | |
* | ||
* @see https://wiki.scala-lang.org/display/SYGN/Loan | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
object FileHelper { | ||
def using[A](filepath: String)(f: Source => A): A = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,8 @@ import akka.event.LookupClassification | |
/** | ||
* Messages are the messages used to route the messages in the bus. | ||
* | ||
* @author Romain Rouvoy <[email protected]> | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Romain Rouvoy</a> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait Message { | ||
/** | ||
|
@@ -41,7 +41,7 @@ trait Message { | |
/** | ||
* Main types definition. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait EventBus extends akka.event.EventBus { | ||
type Event = Message | ||
|
@@ -52,8 +52,8 @@ trait EventBus extends akka.event.EventBus { | |
/** | ||
* Common event bus used by PowerAPI components to communicate. | ||
* | ||
* @author Loic Huertas <loic.huertas@inria.fr> | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:l.huertas[email protected]">Loïc Huertas</a> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
class MessageBus extends EventBus with LookupClassification { | ||
// is used for extracting the classifier from the incoming events | ||
|
@@ -78,8 +78,8 @@ class MessageBus extends EventBus with LookupClassification { | |
/** | ||
* Used to specify the channels used by the components. | ||
* | ||
* @author Romain Rouvoy <[email protected]> | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Romain Rouvoy</a> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
class Channel { | ||
type M <: Message | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ import scala.concurrent.duration.FiniteDuration | |
* One child represents one monitor. | ||
* Allows to publish messages in the right topics depending of the targets. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
class MonitorChild(eventBus: MessageBus, | ||
muid: UUID, | ||
|
@@ -90,7 +90,7 @@ class MonitorChild(eventBus: MessageBus, | |
* This actor listens the bus on a given topic and reacts on the received messages. | ||
* It is responsible to handle a pool of child actors which represent all monitors. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
class Monitors(eventBus: MessageBus) extends Supervisor { | ||
import org.powerapi.core.MonitorChannel.{MonitorStart, MonitorStop, MonitorStopAll, formatMonitorChildName, subscribeMonitorsChannel} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ import scala.concurrent.duration.FiniteDuration | |
/** | ||
* Monitor channel and messages. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
object MonitorChannel extends Channel { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,15 +29,15 @@ import org.powerapi.configuration.TopologyConfiguration | |
* | ||
* @param tid: thread identifier | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
case class Thread(tid: Int) | ||
|
||
/** | ||
* Wrapper class for the time spent by the cpu in each frequency (if dvfs enabled). | ||
* | ||
* @author Aurélien Bourdon <[email protected]> | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Aurélien Bourdon</a | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
case class TimeInStates(times: Map[Long, Long]) { | ||
def -(that: TimeInStates) = | ||
|
@@ -47,7 +47,7 @@ case class TimeInStates(times: Map[Long, Long]) { | |
/** | ||
* Base trait use for implementing os specific methods. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait OSHelper { | ||
import org.powerapi.core.target.{Application, Process, Target} | ||
|
@@ -107,7 +107,7 @@ trait OSHelper { | |
/** | ||
* Linux special helper. | ||
π | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
class LinuxHelper extends OSHelper with Configuration with TopologyConfiguration { | ||
import java.io.{IOException, File} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,8 +26,8 @@ package object target { | |
/** | ||
* Targets are system elements that can be monitored by PowerAPI | ||
* | ||
* @author Romain Rouvoy <[email protected]> | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Romain Rouvoy</a> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait Target | ||
|
||
|
@@ -36,8 +36,8 @@ package object target { | |
* | ||
* @param pid: process identifier. | ||
* | ||
* @author Romain Rouvoy <[email protected]> | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Romain Rouvoy</a> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
case class Process(pid: Int) extends Target | ||
|
||
|
@@ -46,8 +46,8 @@ package object target { | |
* | ||
* @param name: name of the application. | ||
* | ||
* @author Romain Rouvoy <[email protected]> | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Romain Rouvoy</a> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
case class Application(name: String) extends Target | ||
|
||
|
@@ -56,15 +56,15 @@ package object target { | |
* | ||
* @param ratio: usage ratio. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
case class TargetUsageRatio(ratio: Double) | ||
|
||
/** | ||
* Monitoring target for the whole system. | ||
* | ||
* @author Romain Rouvoy <[email protected]> | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Romain Rouvoy</a> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
object All extends Target | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,14 +28,14 @@ import org.powerapi.core.target.Target | |
/** | ||
* Cache entry. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
case class CacheKey(muid: UUID, target: Target) | ||
|
||
/** | ||
* Delegate class used for caching data. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
class Cache[T] { | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ import scala.reflect.ClassTag | |
* Base trait for each PowerAPI formula. | ||
* Each of them should react to a SensorReport, compute the power and then publish a PowerReport. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
abstract class FormulaComponent[SR <: SensorReport : ClassTag](eventBus: MessageBus) extends APIComponent { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,8 +30,8 @@ import org.powerapi.core.{MessageBus, Channel} | |
/** | ||
* Power units. | ||
* | ||
* @author Romain Rouvoy <[email protected]> | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Romain Rouvoy</a> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
object PowerUnit extends Enumeration { | ||
|
||
|
@@ -44,7 +44,7 @@ object PowerUnit extends Enumeration { | |
/** | ||
* PowerChannel channel and messages. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
object PowerChannel extends Channel { | ||
import org.powerapi.core.ClockChannel.ClockTick | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ import org.powerapi.core.Channel | |
/** | ||
* Base channel for the Sensor components. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
object SensorChannel extends Channel { | ||
import akka.actor.ActorRef | ||
|
@@ -41,7 +41,7 @@ object SensorChannel extends Channel { | |
/** | ||
* Main sensor messages. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
trait SensorMessage extends Message | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ import org.powerapi.core.{APIComponent, MessageBus} | |
* Base trait for each PowerAPI sensor. | ||
* Each of them should react to a MonitorTick, sense informations and then publish a SensorReport. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
abstract class SensorComponent(eventBus: MessageBus) extends APIComponent { | ||
import org.powerapi.core.MonitorChannel.{MonitorTick, subscribeMonitorTick} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ import org.powerapi.module.SensorChannel.SensorReport | |
/** | ||
* UsageMetricsChannel channel and messages. | ||
* | ||
* @author Maxime Colmant <[email protected]> | ||
* @author <a href="mailto:[email protected]">Maxime Colmant</a> | ||
*/ | ||
object UsageMetricsChannel extends Channel { | ||
|
||
|
Oops, something went wrong.