// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // #nullable disable using Microsoft.SqlTools.Hosting.Protocol.Contracts; using System; using System.Collections.Generic; namespace Microsoft.SqlTools.ServiceLayer.Migration.Contracts { public class StartPerfDataCollectionParams { /// /// Uri identifier for the connection /// public string OwnerUri { get; set; } /// /// Folder from which collected performance data will be written to /// public string DataFolder { get; set; } /// /// Interval at which performance data will be collected, in seconds /// public int PerfQueryIntervalInSec { get; set; } /// /// Interval at which static (common) data will be collected, in seconds /// public int StaticQueryIntervalInSec { get; set; } /// /// Number of iterations of performance data collection to run before aggregating and saving to disk /// public int NumberOfIterations { get; set; } } public class StopPerfDataCollectionParams { // TO-DO: currently stop data collection doesn't require any parameters } public class RefreshPerfDataCollectionParams { /// /// The last time data collection status was refreshed /// public DateTime LastRefreshedTime { get; set; } } public class StartPerfDataCollectionResult { /// /// The time data collection started /// public DateTime DateTimeStarted { get; set; } } public class StopPerfDataCollectionResult { /// /// The time data collection stopped /// public DateTime DateTimeStopped { get; set; } } public class RefreshPerfDataCollectionResult { /// /// List of status messages captured during data collection /// public List Messages { get; set; } /// /// List of error messages captured during data collection /// public List Errors { get; set; } /// /// The last time data collecton status was refreshed /// public DateTime RefreshTime { get; set; } /// /// Whether or not data collection is currently running /// public bool IsCollecting { get; set; } } public class StartPerfDataCollectionRequest { public static readonly RequestType Type = RequestType.Create("migration/startperfdatacollection"); } public class StopPerfDataCollectionRequest { public static readonly RequestType Type = RequestType.Create("migration/stopperfdatacollection"); } public class RefreshPerfDataCollectionRequest { public static readonly RequestType Type = RequestType.Create("migration/refreshperfdatacollection"); } }