Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
68bafaa
wip: in-memory tracelog
vaind May 4, 2023
f6657f5
in-memory tracelog support
vaind May 5, 2023
9f8727f
profiler - remove temp dir
vaind May 8, 2023
3833b5f
tracelog streaming
vaind May 8, 2023
ad5e21f
fix sample collection
vaind May 9, 2023
1510734
migrate downsampling & fix tests
vaind May 9, 2023
886a2e9
fix: SparseArray
vaind May 10, 2023
2b70a79
update benchmark & profile builder
vaind May 10, 2023
ba3b4e1
minor changes rundown issue investigation
vaind May 11, 2023
079a72c
Merge branch 'main' into feat/streaming-tracelog
vaind May 18, 2023
25592ba
separate rundown session during tracelog init
vaind May 19, 2023
aa3ff4d
fixes
vaind May 20, 2023
3f7b063
Merge branch 'main' into feat/streaming-tracelog
vaind May 22, 2023
9a780eb
update profiling benchmark results
vaind May 22, 2023
61d2718
Merge branch 'main' into feat/streaming-tracelog
vaind May 22, 2023
cc6119f
update tests
vaind May 23, 2023
9005697
Merge branch 'main' into feat/streaming-tracelog
vaind May 23, 2023
f88a20d
update tests
vaind May 23, 2023
f864e7c
fixes
vaind May 23, 2023
04d38a5
update tests to support streaming tracelog
vaind May 30, 2023
8b3691d
Merge branch 'main' into feat/streaming-tracelog
vaind May 30, 2023
9b51611
Merge branch 'main' into feat/streaming-tracelog
vaind Jun 4, 2023
d171989
Merge branch 'main' into feat/streaming-tracelog
vaind Aug 4, 2023
c7f6929
update to latest perfview
vaind Aug 4, 2023
5b159e1
fix test code
vaind Aug 16, 2023
f457e3a
Merge branch 'main' into feat/streaming-tracelog
vaind Aug 16, 2023
b4693e8
Merge branch 'main' into feat/streaming-tracelog
vaind Aug 21, 2023
2634169
Squashed commit of the following (PR #2555):
vaind Aug 21, 2023
670b6fe
perfview submodule setup - unalatered branch
vaind Aug 21, 2023
e89d574
chore: update changelog
vaind Aug 21, 2023
b7ca7b4
fixup: squash
vaind Aug 21, 2023
33e59c6
build
bruno-garcia Aug 22, 2023
4e4b63e
Merge branch 'main' into feat/streaming-tracelog
bruno-garcia Aug 22, 2023
11f2b34
add perfview feed
bruno-garcia Aug 22, 2023
223913a
ms feed pkg
bruno-garcia Aug 22, 2023
1617ef2
ms feed pkg
bruno-garcia Aug 22, 2023
0f5fc2f
ms feed pkg
bruno-garcia Aug 22, 2023
d970fbf
ms feed pkg
bruno-garcia Aug 22, 2023
12e53e5
test: profiler snapshot update
vaind Aug 22, 2023
7a00db9
fix CI
vaind Aug 23, 2023
ba89304
update perfview
vaind Aug 23, 2023
614ae76
fix CI
vaind Aug 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
profiler - remove temp dir
  • Loading branch information
vaind committed May 8, 2023
commit 9f8727f5005c20193d5e7f0c2077c6b880726c35
2 changes: 1 addition & 1 deletion benchmarks/Sentry.Benchmarks/ProfilingBenchmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Sentry.Benchmarks;
public class ProfilingBenchmarks
{
private IHub _hub = Substitute.For<IHub>();
private ITransactionProfilerFactory _factory = new SamplingTransactionProfilerFactory(Path.GetTempPath(), new());
private ITransactionProfilerFactory _factory = new SamplingTransactionProfilerFactory(new());

#region full transaction profiling
public IEnumerable<object[]> ProfilerArguments()
Expand Down
4 changes: 1 addition & 3 deletions src/Sentry.Profiling/SamplingTransactionProfiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ internal class SamplingTransactionProfiler : ITransactionProfiler
private readonly SentryStopwatch _stopwatch = SentryStopwatch.StartNew();
private TimeSpan? _duration;
private Task<MemoryStream>? _data;
private readonly string _tempDirectoryPath;
private Transaction? _transaction;
private readonly SentryOptions _options;

public SamplingTransactionProfiler(string tempDirectoryPath, SentryOptions options, CancellationToken cancellationToken)
public SamplingTransactionProfiler(SentryOptions options, CancellationToken cancellationToken)
{
_options = options;
_tempDirectoryPath = tempDirectoryPath;
_cancellationToken = cancellationToken;
}

Expand Down
7 changes: 2 additions & 5 deletions src/Sentry.Profiling/SamplingTransactionProfilerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ internal class SamplingTransactionProfilerFactory : ITransactionProfilerFactory
// Stop profiling after the given number of milliseconds.
private const int TIME_LIMIT_MS = 30_000;

private readonly string _tempDirectoryPath;

private readonly SentryOptions _options;

public SamplingTransactionProfilerFactory(string tempDirectoryPath, SentryOptions options)
public SamplingTransactionProfilerFactory(SentryOptions options)
{
_tempDirectoryPath = tempDirectoryPath;
_options = options;
}

Expand All @@ -33,7 +30,7 @@ public SamplingTransactionProfilerFactory(string tempDirectoryPath, SentryOption
_options.LogDebug("Starting a sampling profiler session.");
try
{
var profiler = new SamplingTransactionProfiler(_tempDirectoryPath, _options, cancellationToken)
var profiler = new SamplingTransactionProfiler(_options, cancellationToken)
{
OnFinish = () => _inProgress = FALSE
};
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry.Profiling/SentryProfiling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ public ProfilingIntegration(string tempDirectoryPath)
/// <inheritdoc/>
public void Register(IHub hub, SentryOptions options)
{
options.TransactionProfilerFactory = new SamplingTransactionProfilerFactory(_tempDirectoryPath, options);
options.TransactionProfilerFactory = new SamplingTransactionProfilerFactory(options);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void Profiler_StartedNormally_Works()
var hub = Substitute.For<IHub>();
var transactionTracer = new TransactionTracer(hub, "test", "");

var factory = new SamplingTransactionProfilerFactory(Path.GetTempPath(), new SentryOptions { DiagnosticLogger = _testOutputLogger });
var factory = new SamplingTransactionProfilerFactory(new SentryOptions { DiagnosticLogger = _testOutputLogger });
var clock = SentryStopwatch.StartNew();
var sut = factory.Start(transactionTracer, CancellationToken.None);
transactionTracer.TransactionProfiler = sut;
Expand All @@ -83,7 +83,7 @@ public void Profiler_AfterTimeout_Stops()
{
var hub = Substitute.For<IHub>();
var options = new SentryOptions { DiagnosticLogger = _testOutputLogger };
var sut = new SamplingTransactionProfiler(Path.GetTempPath(), options, CancellationToken.None);
var sut = new SamplingTransactionProfiler(options, CancellationToken.None);
var limitMs = 50;
sut.Start(limitMs);
RunForMs(limitMs * 4);
Expand Down