Skip to content
Open
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
15 changes: 15 additions & 0 deletions frameworks/simplew-tuned/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /source

COPY simplew-arena.csproj ./
RUN dotnet restore

COPY . .
RUN dotnet publish -c Release --no-self-contained -o /app

FROM mcr.microsoft.com/dotnet/runtime:10.0
WORKDIR /app
COPY --from=build /app .

EXPOSE 8080 8081
ENTRYPOINT ["dotnet", "simplew-arena.dll"]
69 changes: 69 additions & 0 deletions frameworks/simplew-tuned/Model.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
namespace SimpleW.Benchmarks;

public class DatasetItem
{
public int Id { get; set; }
public string Name { get; set; } = "";
public string Category { get; set; } = "";
public int Price { get; set; }
public int Quantity { get; set; }
public bool Active { get; set; }
public List<string>? Tags { get; set; }
public RatingInfo? Rating { get; set; }
}

public class ProcessedItem
{
public int Id { get; set; }
public string Name { get; set; } = "";
public string Category { get; set; } = "";
public int Price { get; set; }
public int Quantity { get; set; }
public bool Active { get; set; }
public List<string>? Tags { get; set; }
public RatingInfo? Rating { get; set; }
public long Total { get; set; }
}

public class DbItem
{
public int Id { get; set; }
public string Name { get; set; } = "";
public string Category { get; set; } = "";
public int Price { get; set; }
public int Quantity { get; set; }
public bool Active { get; set; }
public List<string>? Tags { get; set; }
public RatingInfo? Rating { get; set; }
}

public class RatingInfo
{
public int Score { get; set; }
public int Count { get; set; }
}

public class ListWithCount<T>(List<T> items)
{

public List<T> Items => items;

public int Count => items.Count;
}

public class CrudListResponse
{
public List<DbItem> Items { get; set; } = [];
public long Total { get; set; }
public int Page { get; set; }
public int Limit { get; set; }
}

public class CrudItem
{
public int Id { get; set; }
public string? Name { get; set; }
public string? Category { get; set; }
public int Price { get; set; }
public int Quantity { get; set; }
}
Loading