Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import java.util.HashMap;
import java.util.List;

import io.quarkus.logging.Log;
import net.laprun.sustainability.power.SensorMetadata;

class AppleSiliconCPU extends CPU {
Expand Down Expand Up @@ -66,7 +65,6 @@ public boolean doneExtractingPowerComponents(String line, HashMap<String, Number
throw new IllegalStateException("Cannot parse power value from line '" + line + "'", e);
}
powerComponents.put(name, value);
Log.infof("POWER component %s = %s", name, value);
}

// we break out once we 've found all the extracted components (in this case, only cpuShare is not extracted)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ public ProcessRecord(String line) throws IllegalArgumentException {
// Trim leading/trailing whitespace
line = line.trim();

Log.info(line);

// Find first whitespace block after process name (marks start of ID)
int idStart = findFirstWhitespace(line);
if (idStart == -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ public Multi<SensorMeasure> uncheckedStream(long pid) throws Exception {
return periodicSensorCheck.map(measures -> measures.getOrDefault(registeredPID));
}

@SuppressWarnings("UnusedReturnValue")
public Cancellable startTrackingApp(String appName, long pid, String session) throws Exception {
final var tracked = uncheckedStream(pid).subscribe().with(m -> persistence.save(m, appName, session));
final var tracked = uncheckedStream(pid)
.filter(m -> SensorMeasure.missing != m)
.subscribe()
.with(m -> persistence.save(m, appName, session));
manuallyTrackedProcesses.put(pid, tracked);
return tracked;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public Measure save(SensorMeasure measure, String appName, String session) {
persisted.startTime = measure.startMs();
persisted.endTime = measure.endMs();
persisted.persist();
Log.infof("Persisted %s, measure duration: %sms", persisted, persisted.endTime - persisted.startTime);
Log.debugf("Persisted %s, measure duration: %sms", persisted, persisted.endTime - persisted.startTime);
return persisted;
}

Expand Down
Loading