mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-25 01:25:40 -05:00
Profiler notifications (#640)
* Initial changes for adding lost event notifications * Handling polling errors by notifying listeners * Restructuring lost events & testing * Minor fixes to tests * Add back in filtering * Changing how lost events are found * Cleaning up tests
This commit is contained in:
committed by
GitHub
parent
f244d307e2
commit
838a7e4fab
@@ -268,7 +268,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Profiler
|
||||
/// <summary>
|
||||
/// Callback when profiler events are available
|
||||
/// </summary>
|
||||
public void EventsAvailable(string sessionId, List<ProfilerEvent> events)
|
||||
public void EventsAvailable(string sessionId, List<ProfilerEvent> events, bool eventsLost)
|
||||
{
|
||||
// pass the profiler events on to the client
|
||||
this.ServiceHost.SendEvent(
|
||||
@@ -276,7 +276,23 @@ namespace Microsoft.SqlTools.ServiceLayer.Profiler
|
||||
new ProfilerEventsAvailableParams()
|
||||
{
|
||||
OwnerUri = sessionId,
|
||||
Events = events
|
||||
Events = events,
|
||||
EventsLost = eventsLost
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback when the XEvent session is closed unexpectedly
|
||||
/// </summary>
|
||||
public void SessionStopped(string viewerId, int sessionId)
|
||||
{
|
||||
// notify the client that their session closed
|
||||
this.ServiceHost.SendEvent(
|
||||
ProfilerSessionStoppedNotification.Type,
|
||||
new ProfilerSessionStoppedParams()
|
||||
{
|
||||
OwnerUri = viewerId,
|
||||
SessionId = sessionId
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user