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
46 changes: 46 additions & 0 deletions Models/CpuPreset.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* ThreadPilot - Advanced Windows Process and Power Plan Manager
* Copyright (C) 2025 Prime Build
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, version 3 only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace ThreadPilot.Models
{
/// <summary>
/// Topology-aware CPU affinity preset generated from a CPU topology snapshot.
/// </summary>
public sealed record CpuPreset
{
public string PresetId { get; init; } = string.Empty;

public string Name { get; init; } = string.Empty;

public string Description { get; init; } = string.Empty;

public CpuSelection Selection { get; init; } = new();

public string Reason { get; init; } = string.Empty;

public string? SourcePresetId { get; init; }

public string? Warning { get; init; }

public CpuTopologySignature? GeneratedByTopologySignature { get; init; }

public bool IsUserEditable { get; init; } = true;

public bool IsGenerated { get; init; } = true;

public bool ReviewRequired { get; init; }
}
}
28 changes: 28 additions & 0 deletions Services/CpuPresetGenerationOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* ThreadPilot - Advanced Windows Process and Power Plan Manager
* Copyright (C) 2025 Prime Build
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, version 3 only.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace ThreadPilot.Services
{
public sealed record CpuPresetGenerationOptions
{
public bool ExcludeCpu0ForGaming { get; init; } = true;

public IReadOnlySet<string> DeletedGeneratedPresetIds { get; init; } =
new HashSet<string>(StringComparer.Ordinal);

public bool IncludeExperimentalPresets { get; init; }
}
}
Loading
Loading