Skip to content

Commit

Permalink
Print storage location
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi committed Jan 25, 2021
1 parent bf62038 commit b7711fd
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
``` ini

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
Intel Core i7-1065G7 CPU 1.30GHz, 1 CPU, 8 logical and 4 physical cores
[Host] : .NET Framework 4.8 (4.8.4250.0), X64 RyuJIT


```
| Method | Mean | Error |
|------------------ |-----:|------:|
| RunFindReferences | NA | NA |

Benchmarks with issues:
FindReferencesBenchmarks.RunFindReferences: DefaultJob
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Method,Job,AnalyzeLaunchVariance,EvaluateOverhead,MaxAbsoluteError,MaxRelativeError,MinInvokeCount,MinIterationTime,OutlierMode,Affinity,EnvironmentVariables,Jit,Platform,PowerPlanMode,Runtime,AllowVeryLargeObjects,Concurrent,CpuGroups,Force,HeapAffinitizeMask,HeapCount,NoAffinitize,RetainVm,Server,Arguments,BuildConfiguration,Clock,EngineFactory,NuGetReferences,Toolchain,IsMutator,InvocationCount,IterationCount,IterationTime,LaunchCount,MaxIterationCount,MaxWarmupIterationCount,MinIterationCount,MinWarmupIterationCount,RunStrategy,UnrollFactor,WarmupCount,Mean,Error
RunFindReferences,DefaultJob,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 4.7.2,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,NA,NA
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8' />
<title>IdeCoreBenchmarks.FindReferencesBenchmarks-20210125-145314</title>

<style type="text/css">
table { border-collapse: collapse; display: block; width: 100%; overflow: auto; }
td, th { padding: 6px 13px; border: 1px solid #ddd; text-align: right; }
tr { background-color: #fff; border-top: 1px solid #ccc; }
tr:nth-child(even) { background: #f8f8f8; }
</style>
</head>
<body>
<pre><code>
BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
Intel Core i7-1065G7 CPU 1.30GHz, 1 CPU, 8 logical and 4 physical cores
[Host] : .NET Framework 4.8 (4.8.4250.0), X64 RyuJIT
</code></pre>
<pre><code></code></pre>

<table>
<thead><tr><th> Method</th><th>Mean</th><th>Error</th>
</tr>
</thead><tbody><tr><td>RunFindReferences</td><td>NA</td><td>NA</td>
</tr></tbody></table>
</body>
</html>
3 changes: 2 additions & 1 deletion src/Tools/IdeCoreBenchmarks/FindReferencesBenchmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public void Setup()

_workspace.TryApplyChanges(_workspace.CurrentSolution.WithOptions(_workspace.Options
.WithChangedOption(StorageOptions.Database, StorageDatabase.SQLite)
.WithChangedOption(StorageOptions.DatabaseMustSucceed, true)));
.WithChangedOption(StorageOptions.DatabaseMustSucceed, true)
.WithChangedOption(StorageOptions.PrintDatabaseLocation, true)));

Console.WriteLine("Opening roslyn. Attach to: " + Process.GetCurrentProcess().Id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ internal IChecksummedPersistentStorage GetStorageWorker(Workspace workspace, Sol
return NoOpPersistentStorage.Instance;
}

if (workspace.Options.GetOption(StorageOptions.PrintDatabaseLocation))
Console.WriteLine("Storage location: " + workingFolder);

// If we already had some previous cached service, let's let it start cleaning up
if (_currentPersistentStorage != null)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Workspaces/Core/Portable/Storage/StorageOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ internal static class StorageOptions
OptionName, nameof(Database), defaultValue: StorageDatabase.SQLite);
public static readonly Option<bool> DatabaseMustSucceed = new(
OptionName, nameof(DatabaseMustSucceed), defaultValue: false);
public static readonly Option<bool> PrintDatabaseLocation = new(
OptionName, nameof(PrintDatabaseLocation), defaultValue: false);
}

[ExportOptionProvider, Shared]
Expand Down

0 comments on commit b7711fd

Please sign in to comment.