All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.singularity.data.usage.TaskUsageJDBI Maven / Gradle / Ivy

package com.hubspot.singularity.data.usage;

import com.hubspot.singularity.SingularityTaskUsage;
import java.util.List;

public interface TaskUsageJDBI {
  String FIELDS =
    "requestId, taskId, memoryTotalBytes, timestamp, cpuSeconds, diskTotalBytes, cpusNrPeriods, cpusNrThrottled, cpusThrottledTimeSecs";
  String FIELD_VALUES =
    ":requestId, :taskId, :memoryTotalBytes, :timestamp, :cpuSeconds, :diskTotalBytes, :cpusNrPeriods, :cpusNrThrottled, :cpusThrottledTimeSecs";

  void deleteTaskUsage(String taskId);

  void deleteSpecificTaskUsage(String taskId, long timestamp);

  void saveSpecificTaskUsage(
    String requestId,
    String taskId,
    long memoryTotalBytes,
    long timestamp,
    double cpuSeconds,
    long diskTotalBytes,
    long cpusNrPeriods,
    long cpusNrThrottled,
    double cpusThrottledTimeSecs
  );

  List getTaskUsage(String taskId);

  List getUniqueTaskIds();

  List getUsageTimestampsForTask(String taskId);

  int countTasksWithUsage();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy