Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
162ea2a
prepare traceevent integration
vaind Apr 23, 2023
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
4ffb45a
submodule perfview sentry fork
bruno-garcia Aug 14, 2023
3a7a10f
Merge branch 'main' into chore/integrate-traceevent
bitsandfoxes Aug 16, 2023
5b159e1
fix test code
vaind Aug 16, 2023
f457e3a
Merge branch 'main' into feat/streaming-tracelog
vaind Aug 16, 2023
abc81db
Merge branch 'feat/streaming-tracelog' into chore/integrate-traceevent
vaind Aug 16, 2023
b4f9485
script & project updates
vaind Aug 16, 2023
5ff8f1a
profiling in core sln
bruno-garcia Aug 19, 2023
0bbb0bd
Merge branch 'chore/integrate-traceevent' into feat/profiling-low-ove…
bruno-garcia Aug 19, 2023
aee692b
perfview sampling
bruno-garcia Aug 20, 2023
3376bea
perfview under profiling
bruno-garcia Aug 20, 2023
6e2ae7c
remove profiling from sln/slnf
bruno-garcia Aug 20, 2023
790d774
internal perfview
bruno-garcia Aug 20, 2023
b346567
ignore build files from submodule perfview
bruno-garcia Aug 20, 2023
6cb6cd1
fix structure
bruno-garcia Aug 20, 2023
19e24a2
resolve errors
bruno-garcia Aug 20, 2023
1c98746
builds!
bruno-garcia Aug 20, 2023
40b6add
in SentryCore sln
bruno-garcia Aug 20, 2023
43f78a0
gitignore on module
bruno-garcia Aug 20, 2023
53715f4
set correct platform to profile
bruno-garcia Aug 20, 2023
67ef890
log on collection failure
bruno-garcia Aug 20, 2023
915a0f2
sample
bruno-garcia Aug 20, 2023
791cdc6
fixed sln file with all but mobile
bruno-garcia Aug 20, 2023
bec4641
ignore obj
bruno-garcia Aug 20, 2023
3a05994
fix benchmarks. Package it
bruno-garcia Aug 20, 2023
f1ea1ec
fix tfm in script
bruno-garcia Aug 20, 2023
7c7404d
verify
bruno-garcia Aug 20, 2023
20286f4
new full sln file
bruno-garcia Aug 20, 2023
aa01035
pack profiling
bruno-garcia Aug 20, 2023
b5cccee
add profile category
bruno-garcia Aug 20, 2023
1a593bc
fuck this slnf mess
bruno-garcia Aug 21, 2023
eaa320b
debugging on sample
bruno-garcia Aug 21, 2023
833a319
Merge branch 'main' into feat/profiling-low-overhead
vaind Aug 21, 2023
6a1df09
timeout update
vaind Aug 21, 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