37 references to InvalidOperationException
Microsoft.Extensions.Diagnostics.ResourceMonitoring (37)
Linux\LinuxUtilizationParserCgroupV1.cs (15)
108
Throw.
InvalidOperationException
($"Could not get cpu usage from '{_cpuacctUsage}'. Expected positive number, but got '{new string(usage)}'.");
128
Throw.
InvalidOperationException
($"Expected proc/stat to start with '{StartingTokens}' but it was '{new string(bufferWriter.Buffer.WrittenSpan)}'.");
144
Throw.
InvalidOperationException
(
194
Throw.
InvalidOperationException
($"Could not parse '{_memoryLimitInBytes}' content. Expected to find available memory in bytes but got '{new string(memoryBuffer)}' instead.");
215
Throw.
InvalidOperationException
($"Unable to find total_inactive_file from '{_memoryStat}'.");
223
Throw.
InvalidOperationException
($"The value of total_inactive_file found in '{_memoryStat}' is not a positive number: '{new string(inactiveMemorySlice)}'.");
236
Throw.
InvalidOperationException
(
246
Throw.
InvalidOperationException
($"The total memory usage read from '{_memoryUsageInBytes}' is lesser than inactive memory usage read from '{_memoryStat}'.");
265
Throw.
InvalidOperationException
($"Could not parse '{_memInfo}'. We expected first line of the file to start with '{MemTotal}' but it was '{new string(firstLine)}' instead.");
274
Throw.
InvalidOperationException
($"Could not parse '{_memInfo}'. We expected to get total memory usage on first line but we've got: '{new string(firstLine)}'.");
279
Throw.
InvalidOperationException
($"Could not parse '{_memInfo}'. We expected to get memory usage followed by the unit (kB, MB, GB) but found no unit: '{new string(firstLine)}'.");
364
Throw.
InvalidOperationException
(
419
Throw.
InvalidOperationException
($"Could not parse '{_cpuCfsQuotaUs}'. Expected an integer but got: '{new string(quotaBuffer)}'.");
437
Throw.
InvalidOperationException
($"Could not parse '{_cpuCfsPeriodUs}'. Expected to get an integer but got: '{new string(periodBuffer)}'.");
467
Throw.
InvalidOperationException
($"Could not parse '{_cpuPodWeight}' content. Expected to find CPU weight but got '{new string(cpuPodWeightBuffer)}' instead.");
Linux\LinuxUtilizationParserCgroupV2.cs (18)
115
Throw.
InvalidOperationException
($"Could not parse '{_cpuacctUsage}'. We expected first line of the file to start with '{Usage_usec}' but it was '{new string(usage)}' instead.");
124
Throw.
InvalidOperationException
($"Could not get cpu usage from '{_cpuacctUsage}'. Expected positive number, but got '{new string(usage)}'.");
146
Throw.
InvalidOperationException
($"Expected proc/stat to start with '{StartingTokens}' but it was '{new string(bufferWriter.Buffer.WrittenSpan)}'.");
162
Throw.
InvalidOperationException
(
230
Throw.
InvalidOperationException
($"Could not parse '{_memoryLimitInBytes}' content. Expected to find available memory in bytes but got '{new string(memoryBuffer)}' instead.");
263
Throw.
InvalidOperationException
(
301
Throw.
InvalidOperationException
($"Unable to find inactive_file from '{_memoryStat}'.");
310
Throw.
InvalidOperationException
($"The value of inactive_file found in '{_memoryStat}' is not a positive number: '{new string(inactiveMemorySlice)}'.");
328
Throw.
InvalidOperationException
($"The total memory usage read from '{_memoryUsageInBytes}' is lesser than inactive memory read from '{_memoryStat}'.");
347
Throw.
InvalidOperationException
($"Could not parse '{_memInfo}'. We expected first line of the file to start with '{MemTotal}' but it was '{new string(firstLine)}' instead.");
356
Throw.
InvalidOperationException
($"Could not parse '{_memInfo}'. We expected to get total memory usage on first line but we've got: '{new string(firstLine)}'.");
361
Throw.
InvalidOperationException
($"Could not parse '{_memInfo}'. We expected to get memory usage followed by the unit (kB, MB, GB) but found no unit: '{new string(firstLine)}'.");
446
Throw.
InvalidOperationException
(
516
Throw.
InvalidOperationException
($"Could not parse '{_cpuCfsQuaotaPeriodUs}'. Expected an integer but got: '{new string(quotaBuffer)}'.");
526
Throw.
InvalidOperationException
($"Could not parse '{_cpuCfsQuaotaPeriodUs}'. Expected to get an integer but got: '{new string(cpuPeriodSlice)}'.");
551
Throw.
InvalidOperationException
(
559
Throw.
InvalidOperationException
(
592
Throw.
InvalidOperationException
(
Linux\Network\LinuxNetworkUtilizationParser.cs (3)
80
Throw.
InvalidOperationException
($"Could not split contents. We expected every line to contain more than {Target - 1} elements, but it has only {numRanges} elements.");
147
Throw.
InvalidOperationException
($"Could not parse '{file}'. File was empty.");
153
Throw.
InvalidOperationException
($"Could not parse '{file}'. We expected first line of the file to start with '{Sl}' but it was '{firstLine.ToString()}' instead.");
src\Shared\BufferWriterPool\BufferWriter.cs (1)
182
Throw.
InvalidOperationException
("Exceeded array capacity");