do proper formatting for 1 threaded cpu

This commit is contained in:
13xforever 2021-08-07 23:44:11 +05:00
parent 86d490432e
commit ac22112cb2

View File

@ -117,7 +117,8 @@ namespace CompatBot.Utils.ResultFormatters
systemInfo += " " + items["os_version"];
}
}
systemInfo += $"{Environment.NewLine}{items["cpu_model"]} | {items["thread_count"]} Threads | {items["memory_amount"]} GiB RAM";
var threadCountItem = items["thread_count"]?.Trim();
systemInfo += $"{Environment.NewLine}{items["cpu_model"]} | {threadCountItem} Thread{(threadCountItem == "1" ? "" : "s")} | {items["memory_amount"]} GiB RAM";
if (!string.IsNullOrEmpty(items["cpu_tsc"]) && items["cpu_tsc"] != "Bad")
systemInfo += " | TSC: " + items["cpu_tsc"];
if (!string.IsNullOrEmpty(items["cpu_extensions"]))