Skip to content

Commit

Permalink
Merge pull request #131 from SpareCores/dev-387-compare
Browse files Browse the repository at this point in the history
Dev 387 compare
  • Loading branch information
daroczig authored Oct 14, 2024
2 parents e3304cc + d7a293e commit c843d41
Show file tree
Hide file tree
Showing 13 changed files with 140 additions and 564 deletions.
24 changes: 1 addition & 23 deletions sdk/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import {
GetServerBenchmarksServerVendorServerBenchmarksGetData,
GetServerPricesServerVendorServerPricesGetData,
GetServerPricesServerVendorServerPricesGetParams,
GetServerServerVendorServerGetData,
GetServerServerVendorServerGetParams,
GetSimilarServersServerVendorServerSimilarServersByNumGetData,
GetSimilarServersServerVendorServerSimilarServersByNumGetParams,
HTTPValidationError,
Expand All @@ -29,27 +27,7 @@ export class Server<SecurityDataType = unknown> {
}

/**
* @description Query a single server by its vendor id and either the server or, or its API reference. Return dictionary includes all server fields, along with the current prices per zone, and the available benchmark scores.
*
* @tags Server Details
* @name GetServerServerVendorServerGet
* @summary Get Server
* @request GET:/server/{vendor}/{server}
* @deprecated
*/
getServerServerVendorServerGet = (
{ vendor, server, ...query }: GetServerServerVendorServerGetParams,
params: RequestParams = {},
) =>
this.http.request<GetServerServerVendorServerGetData, HTTPValidationError>({
path: `/server/${vendor}/${server}`,
method: "GET",
query: query,
format: "json",
...params,
});
/**
* @description Search similar servers to the provided one. The "family" method returns all servers from the same family of the same vendor. The "specs" approach will prioritize the number of GPUs, then CPUs, lastly the amount of memory. The "score" method will find the servers with the closest performance using the multi-core SCore.
* @description Search similar servers to the provided one. The "family" method returns all servers from the same family of the same vendor. The "specs" approach will prioritize the number of GPUs, then CPUs, lastly the amount of memory. The "score" method will find the servers with the closest performance using the multi-core SCore. The "score_per_price" method is similar to "score", but instead of using the multi-core SCore, it uses the SCore per price.
*
* @tags Server Details
* @name GetSimilarServersServerVendorServerSimilarServersByNumGet
Expand Down
8 changes: 6 additions & 2 deletions sdk/ServerPricesRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,14 @@ export namespace ServerPrices {
cpu_family?: "ARMv8" | "Ampere Altra" | "EPYC" | "Xeon";
/**
* SCore
* Minimum stress-ng CPU workload score.
* Minimum stress-ng div16 CPU workload score.
*/
benchmark_score_stressng_cpu_min?: number | null;
/**
* $Core
* Minimum stress-ng div16 CPU workload score per USD/hr.
*/
benchmark_score_per_price_stressng_cpu_min?: number | null;
/**
* Minimum memory
* Minimum amount of memory in GBs.
Expand Down Expand Up @@ -337,7 +342,6 @@ export namespace ServerPrices {
*/
order_by?: string;
/**
* Order Dir
* Order direction.
* @default "asc"
*/
Expand Down
38 changes: 2 additions & 36 deletions sdk/ServerRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,12 @@
import {
GetServerBenchmarksServerVendorServerBenchmarksGetData,
GetServerPricesServerVendorServerPricesGetData,
GetServerServerVendorServerGetData,
GetSimilarServersServerVendorServerSimilarServersByNumGetData,
} from "./data-contracts";

export namespace Server {
/**
* @description Query a single server by its vendor id and either the server or, or its API reference. Return dictionary includes all server fields, along with the current prices per zone, and the available benchmark scores.
* @tags Server Details
* @name GetServerServerVendorServerGet
* @summary Get Server
* @request GET:/server/{vendor}/{server}
* @deprecated
*/
export namespace GetServerServerVendorServerGet {
export type RequestParams = {
/**
* Vendor
* Vendor ID.
*/
vendor: string;
/**
* Server
* Server ID or API reference.
*/
server: string;
};
export type RequestQuery = {
/**
* Currency
* Currency used for prices.
*/
currency?: string | null;
};
export type RequestBody = never;
export type RequestHeaders = {};
export type ResponseBody = GetServerServerVendorServerGetData;
}

/**
* @description Search similar servers to the provided one. The "family" method returns all servers from the same family of the same vendor. The "specs" approach will prioritize the number of GPUs, then CPUs, lastly the amount of memory. The "score" method will find the servers with the closest performance using the multi-core SCore.
* @description Search similar servers to the provided one. The "family" method returns all servers from the same family of the same vendor. The "specs" approach will prioritize the number of GPUs, then CPUs, lastly the amount of memory. The "score" method will find the servers with the closest performance using the multi-core SCore. The "score_per_price" method is similar to "score", but instead of using the multi-core SCore, it uses the SCore per price.
* @tags Server Details
* @name GetSimilarServersServerVendorServerSimilarServersByNumGet
* @summary Get Similar Servers
Expand All @@ -73,7 +39,7 @@ export namespace Server {
* By
* Algorithm to look for similar servers.
*/
by: "family" | "specs" | "score";
by: "family" | "specs" | "score" | "score_per_price";
/**
* Num
* Number of servers to get.
Expand Down
8 changes: 6 additions & 2 deletions sdk/ServersRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,14 @@ export namespace Servers {
cpu_family?: "ARMv8" | "Ampere Altra" | "EPYC" | "Xeon";
/**
* SCore
* Minimum stress-ng CPU workload score.
* Minimum stress-ng div16 CPU workload score.
*/
benchmark_score_stressng_cpu_min?: number | null;
/**
* $Core
* Minimum stress-ng div16 CPU workload score per USD/hr.
*/
benchmark_score_per_price_stressng_cpu_min?: number | null;
/**
* Minimum memory
* Minimum amount of memory in GBs.
Expand Down Expand Up @@ -146,7 +151,6 @@ export namespace Servers {
*/
order_by?: string;
/**
* Order Dir
* Order direction.
* @default "asc"
*/
Expand Down
1 change: 0 additions & 1 deletion sdk/StoragePricesRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ export namespace StoragePrices {
*/
order_by?: string;
/**
* Order Dir
* Order direction.
* @default "asc"
*/
Expand Down
1 change: 0 additions & 1 deletion sdk/TrafficPricesRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ export namespace TrafficPrices {
*/
order_by?: string;
/**
* Order Dir
* Order direction.
* @default "asc"
*/
Expand Down
Loading

0 comments on commit c843d41

Please sign in to comment.