Skip to content

Commit

Permalink
Merge branch 'pr-belgaid' of github.com:powerapi-ng/pyRAPL into pr-be…
Browse files Browse the repository at this point in the history
…lgaid
  • Loading branch information
altor committed Sep 25, 2019
2 parents 079a396 + 58c4b40 commit dae3c01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyRAPL/pyRAPL.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import logging
import time
import functools
from math import ldexp

from enum import Enum

Expand Down Expand Up @@ -204,7 +203,7 @@ def energy(self, device):

api_file = self._sys_api[device]
api_file.seek(0, 0)
return ldexp(int(api_file.readline()), -32)
return int(api_file.readline())

def _begin_record(self, device):
energy = self.energy(device)
Expand Down Expand Up @@ -244,7 +243,8 @@ def stop(self):

def _compute_recorded_energy(self, device):

recorded_energy = self._measure[device][1] - self._measure[device][0]
recorded_energy = (self._measure[device][1] - self._measure[device][0])/1000000
# print("yolo")
self._measure[device][0] = None
self._measure[device][1] = None
return recorded_energy
Expand Down

0 comments on commit dae3c01

Please sign in to comment.