Skip to content

Commit 6ed6505

Browse files
author
Alex Peck
committed
info
1 parent 80ba526 commit 6ed6505

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

BitFaster.Caching.ThroughputAnalysis/Exporter.cs

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Globalization;
55
using System.IO;
66
using System.Linq;
7+
using System.Runtime.InteropServices;
78
using CsvHelper;
89
using Microsoft.FSharp.Core;
910
using Plotly.NET;
@@ -107,16 +108,36 @@ public void ExportPlot(Mode mode, int cacheSize)
107108

108109
public string MapTitle(Mode mode, int cacheSize)
109110
{
111+
string arch = System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture.ToString();
112+
string fwk = RuntimeInformation.FrameworkDescription.ToString();
113+
114+
string os = "Win";
115+
116+
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
117+
{
118+
os = "Mac";
119+
}
120+
121+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
122+
{
123+
os = "Linux";
124+
}
125+
126+
if (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD))
127+
{
128+
os = "BSD";
129+
}
130+
110131
switch (mode)
111132
{
112133
case Mode.Read:
113-
return $"Read throughput (100% cache hit)";
134+
return $"Read throughput (100% cache hit) ({os}/{arch}/{fwk})";
114135
case Mode.ReadWrite:
115-
return $"Read + Write throughput";
136+
return $"Read + Write throughput ({os}/{arch}/{fwk})";
116137
case Mode.Update:
117-
return $"Update throughput";
138+
return $"Update throughput ({os}/{arch}/{fwk})";
118139
case Mode.Evict:
119-
return $"Eviction throughput (100% cache miss)";
140+
return $"Eviction throughput (100% cache miss) ({os}/{arch}/{fwk})";
120141
default:
121142
return $"{mode} {cacheSize}";
122143
}

0 commit comments

Comments
 (0)