Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
davmason committed Jun 11, 2021
1 parent 105942e commit 022bc7a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 53 deletions.
26 changes: 24 additions & 2 deletions documentation/diagnostics-client-library-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,36 @@ public static void PrintEventsLive(int processId)

This sample shows how to attach an ICorProfiler to a process (profiler attach).
```cs
public static int AttachProfiler(int processId, Guid profilerGuid, string profilerPath)
public static void AttachProfiler(int processId, Guid profilerGuid, string profilerPath)
{
var client = new DiagnosticsClient(processId);
return client.AttachProfiler(TimeSpan.FromSeconds(10), profilerGuid, profilerPath);
client.AttachProfiler(TimeSpan.FromSeconds(10), profilerGuid, profilerPath);
}
```

#### 8. Set an ICorProfiler to be used as the startup profiler

This sample shows how to request that the runtime use an ICorProfiler as the startup profiler (not as an attaching profiler). It is only valid to issue this command while the runtime is paused in "reverse server" mode.

```cs
public static void SetStartupProfilerProfiler(Guid profilerGuid, string profilerPath)
{
var client = new DiagnosticsClient(processId);
client.SetStartupProfiler(profilerGuid, profilerPath);
}
```

#### 9. Resume the runtime when it is paused in reverse server mode

This sample shows how a client can instruct the runtime to resume loading after it has been paused in "reverse server" mode.

```cs
public static void ResumeRuntime(Guid profilerGuid, string profilerPath)
{
var client = new DiagnosticsClient(processId);
client.ResumeRuntime();
}
```

## API Description

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void AttachProfiler(TimeSpan attachTimeout, Guid profilerGuid, string pro
/// </summary>
/// <param name="profilerGuid">Guid for the profiler to be attached</param>
/// <param name="profilerPath">Path to the profiler to be attached</param>
public void StartupProfiler(Guid profilerGuid, string profilerPath)
public void SetStartupProfiler(Guid profilerGuid, string profilerPath)
{
if (profilerGuid == null || profilerGuid == Guid.Empty)
{
Expand Down

This file was deleted.

0 comments on commit 022bc7a

Please sign in to comment.