Skip to content

Commit

Permalink
Renaming presets to SmallChunks and LargeChunks, as this makes more s…
Browse files Browse the repository at this point in the history
…ense than having the game name directly.
  • Loading branch information
tpill90 committed Feb 13, 2024
1 parent 00cd5ea commit 2dcf41e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions SteamPrefill/CliCommands/Benchmark/BenchmarkModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public override string ToString()
[Intellenum(typeof(string))]
public sealed partial class PresetWorkload
{
public static readonly PresetWorkload Destiny2 = new PresetWorkload("1085660");
public static readonly PresetWorkload Dota2 = new PresetWorkload("570");
public static readonly PresetWorkload BigChunks = new PresetWorkload("1085660");
public static readonly PresetWorkload SmallChunks = new PresetWorkload("570");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class BenchmarkSetupCommand : ICommand
public bool? NoAnsiEscapeSequences { get; init; }

[CommandOption("preset",
Description = "Sets up a benchmark with one or more preset workloads, with differing performance characteristics. Can be Destiny2/Dota2",
Description = "Sets up a benchmark with one or more preset workloads, with differing performance characteristics. Can be SmallChunks/BigChunks",
Converter = typeof(PresetWorkloadConverter),
Validators = new[] { typeof(PresetWorkloadValidator) })]
public IReadOnlyList<PresetWorkload> Presets { get; init; } = new List<PresetWorkload> { };
Expand Down
4 changes: 2 additions & 2 deletions SteamPrefill/CliCommands/Converters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public override BindingValidationError Validate(PresetWorkload[] value)
if (value.Length == 0)
{
AnsiConsole.MarkupLine(Red($"A preset must be specified when using {LightYellow("--preset")}"));
AnsiConsole.Markup(Red($"Valid presets include : {LightYellow("Destiny2/Dota2")}"));
AnsiConsole.Markup(Red($"Valid presets include : {LightYellow("SmallChunks/BigChunks")}"));
throw new CommandException(".", 1, true);
}
return Ok();
Expand All @@ -82,7 +82,7 @@ public override PresetWorkload Convert(string rawValue)
if (!PresetWorkload.TryFromName(rawValue, out var _))
{
AnsiConsole.MarkupLine(Red($"{White(rawValue)} is not a valid preset"));
AnsiConsole.Markup(Red($"Valid presets include : {LightYellow("Destiny2/Dota2")}"));
AnsiConsole.Markup(Red($"Valid presets include : {LightYellow("SmallChunks/BigChunks")}"));
throw new CommandException(".", 1, true);
}
return PresetWorkload.FromName(rawValue);
Expand Down
2 changes: 1 addition & 1 deletion SteamPrefill/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"Benchmark - Setup - Preset": {
"commandName": "Project",
"commandLineArgs": "benchmark setup --preset Destiny2"
"commandLineArgs": "benchmark setup -h"
},
"Benchmark - Setup - All": {
"commandName": "Project",
Expand Down
4 changes: 2 additions & 2 deletions docs/mkdocs/detailed-command-usage/Benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Creates a benchmark "workload" comprised of multiple apps, that will then be ben
| --all | | Benchmark workload will be created using all currently owned apps. |
| --appid | | The id of one or more apps to include in benchmark workload file. Useful for testing a specific app, without having to modify previously selected apps. AppIds can be found using [SteamDB](https://steamdb.info/) |
| --no-ansi | | Application output will be in plain text, rather than using the visually appealing colors and progress bars. Should only be used if terminal does not support Ansi Escape sequences, or when redirecting output to a file. |
| --preset | Dota2, Destiny2 | Can be used to quickly setup a benchmark with a predefined workload of differing characteristics. Destiny2 represents a best case scenario where chunk sizes are close to 1Mib, whereas Dota2 is a worst case scenario of small files. |

| --preset | SmallChunks, LargeChunks | Can be used to quickly setup a benchmark with a predefined workload of differing characteristics. LargeChunks represents a best case scenario where chunk sizes are close to 1Mib, whereas SmallChunks is a worst case scenario of small files. |
<!-- TODO update preset docs to represent small chunks / big chunks -->
-----

## run
Expand Down

0 comments on commit 2dcf41e

Please sign in to comment.