import request from "@/utils/request";

// 查询算法性能评估列表
export function listPerf(query) {
  return request({
    url: "/test/perf/list",
    method: "get",
    params: query,
  });
}

// 查询算法性能评估详细
export function getPerf(id) {
  return request({
    url: "/test/perf/" + id,
    method: "get",
  });
}

// 新增算法性能评估
export function addPerf(data) {
  return request({
    url: "/test/perf",
    method: "post",
    data: data,
  });
}

// 修改算法性能评估
export function updatePerf(data) {
  return request({
    url: "/test/perf",
    method: "put",
    data: data,
  });
}

// 删除算法性能评估
export function delPerf(id) {
  return request({
    url: "/test/perf/" + id,
    method: "delete",
  });
}

// 运行算法性能评估
export function run(id) {
  return request({
    url: `/test/perf/run/${id}`,
    method: "put",
  });
}
