Skip to content
This repository has been archived by the owner on Mar 11, 2019. It is now read-only.

Getting started API

Loïc Huertas edited this page May 22, 2015 · 12 revisions

How to acquire it

There are two ways to acquire PowerAPI: With or without Maven repositories. In other words, directly from Maven repositories (to get stable or snapshot versions), or from our Git repository (to get the source code).

With Maven repositories

Stable versions are available from the Maven central repository.

Snapshot versions are available from the OSS Sonatype repository. Thus, you have to add this following repository location:

  • pom.xml
<repository>
  <id>OSS Sonatype snapshot repository</id>
	<url>https://oss.sonatype.org/content/repositories/snapshots</url>
	<snapshots>
		<enabled>true</enabled>
	</snapshots>
</repository>
  • build.sbt
resolvers ++= Seq(
  "OSS Sonatype snapshot repository" at "https://oss.sonatype.org/content/repositories/snapshots"
)

Without Maven repositories

Without Maven repositories, you have to deal with our Git repository as explain below:

To acquire PowerAPI, simply clone it via your Git client:

git clone git://github.com/Spirals-Team/powerapi

As PowerAPI is a sbt managed project, you have to launch the publishLocal command at the root directory (here, POWERAPI_DIR) in order to compile and install it to your local machine. To be able to use the metrics from the hardware counters, PowerAPI has to be installed and used as a root user.

cd $POWERAPI_DIR
sudo sbt publishLocal

How to use it