1 write to Buffer
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
src\Shared\BufferWriterPool\ReturnableBufferWriter.cs (1)
29
Buffer
= pool.Get();
51 references to Buffer
Microsoft.Extensions.Diagnostics.ResourceMonitoring (51)
Linux\LinuxUtilizationParserCgroupV1.cs (25)
100
_fileSystem.ReadAll(_cpuacctUsage, bufferWriter.
Buffer
);
102
ReadOnlySpan<char> usage = bufferWriter.
Buffer
.WrittenSpan;
121
_fileSystem.ReadFirstLine(_procStat, bufferWriter.
Buffer
);
123
ReadOnlySpan<char> stat = bufferWriter.
Buffer
.WrittenSpan;
126
if (!bufferWriter.
Buffer
.WrittenSpan.StartsWith(StartingTokens))
128
Throw.InvalidOperationException($"Expected proc/stat to start with '{StartingTokens}' but it was '{new string(bufferWriter.
Buffer
.WrittenSpan)}'.");
187
_fileSystem.ReadAll(_memoryLimitInBytes, bufferWriter.
Buffer
);
189
ReadOnlySpan<char> memoryBuffer = bufferWriter.
Buffer
.WrittenSpan;
208
_fileSystem.ReadAll(_memoryStat, bufferWriter.
Buffer
);
209
ReadOnlySpan<char> memoryFile = bufferWriter.
Buffer
.WrittenSpan;
226
bufferWriter.
Buffer
.Reset();
228
_fileSystem.ReadAll(_memoryUsageInBytes, bufferWriter.
Buffer
);
230
ReadOnlySpan<char> containerMemoryUsageFile = bufferWriter.
Buffer
.WrittenSpan;
240
bufferWriter.
Buffer
.Reset();
260
_fileSystem.ReadFirstLine(_memInfo, bufferWriter.
Buffer
);
261
ReadOnlySpan<char> firstLine = bufferWriter.
Buffer
.WrittenSpan;
305
_fileSystem.ReadFirstLine(_cpuSetCpus, bufferWriter.
Buffer
);
306
ReadOnlySpan<char> stats = bufferWriter.
Buffer
.WrittenSpan;
405
fileSystem.ReadFirstLine(_cpuCfsQuotaUs, bufferWriter.
Buffer
);
407
ReadOnlySpan<char> quotaBuffer = bufferWriter.
Buffer
.WrittenSpan;
422
bufferWriter.
Buffer
.Reset();
424
fileSystem.ReadFirstLine(_cpuCfsPeriodUs, bufferWriter.
Buffer
);
425
ReadOnlySpan<char> periodBuffer = bufferWriter.
Buffer
.WrittenSpan;
461
fileSystem.ReadFirstLine(_cpuPodWeight, bufferWriter.
Buffer
);
462
ReadOnlySpan<char> cpuPodWeightBuffer = bufferWriter.
Buffer
.WrittenSpan;
Linux\LinuxUtilizationParserCgroupV2.cs (23)
110
_fileSystem.ReadAll(_cpuacctUsage, bufferWriter.
Buffer
);
111
ReadOnlySpan<char> usage = bufferWriter.
Buffer
.WrittenSpan;
139
_fileSystem.ReadFirstLine(_procStat, bufferWriter.
Buffer
);
141
ReadOnlySpan<char> stat = bufferWriter.
Buffer
.WrittenSpan;
144
if (!bufferWriter.
Buffer
.WrittenSpan.StartsWith(StartingTokens))
146
Throw.InvalidOperationException($"Expected proc/stat to start with '{StartingTokens}' but it was '{new string(bufferWriter.
Buffer
.WrittenSpan)}'.");
217
_fileSystem.ReadAll(_memoryLimitInBytes, bufferWriter.
Buffer
);
219
ReadOnlySpan<char> memoryBuffer = bufferWriter.
Buffer
.WrittenSpan;
255
_fileSystem.ReadAll(memoryUsageInBytesFile, bufferWriter.
Buffer
);
257
ReadOnlySpan<char> memoryUsageFile = bufferWriter.
Buffer
.WrittenSpan;
269
bufferWriter.
Buffer
.Reset();
293
_fileSystem.ReadAll(_memoryStat, bufferWriter.
Buffer
);
294
memoryFile = bufferWriter.
Buffer
.WrittenSpan;
342
_fileSystem.ReadFirstLine(_memInfo, bufferWriter.
Buffer
);
343
ReadOnlySpan<char> firstLine = bufferWriter.
Buffer
.WrittenSpan;
387
_fileSystem.ReadFirstLine(_cpuSetCpus, bufferWriter.
Buffer
);
388
ReadOnlySpan<char> stats = bufferWriter.
Buffer
.WrittenSpan;
496
fileSystem.ReadFirstLine(_cpuCfsQuaotaPeriodUs, bufferWriter.
Buffer
);
498
ReadOnlySpan<char> quotaBuffer = bufferWriter.
Buffer
.WrittenSpan;
546
fileSystem.ReadFirstLine(_cpuPodWeight, bufferWriter.
Buffer
);
547
ReadOnlySpan<char> cpuPodWeightBuffer = bufferWriter.
Buffer
.WrittenSpan;
584
_fileSystem.ReadAll(_memoryUsageInBytes, bufferWriter.
Buffer
);
586
ReadOnlySpan<char> memoryUsageFile = bufferWriter.
Buffer
.WrittenSpan;
Linux\Network\LinuxNetworkUtilizationParser.cs (1)
144
using IEnumerator<ReadOnlyMemory<char>> enumerableLines = _fileSystem.ReadAllByLines(file, bufferWriter.
Buffer
).GetEnumerator();
src\Shared\BufferWriterPool\ReturnableBufferWriter.cs (2)
42
Buffer
.Reset();
43
_pool.Return(
Buffer
);