mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
* Checkpoint * Checkpoint * Checkpoint * checkpoint * Hooking in calls to QueryExecutionService * adding cases * Fleshing out report handlers * Adding parameter converters * Adding sqlparam declarations for Top Resource Consumers and Forced Plans * swapping to object-object to centralize conversion for sqlparams * Adding sqlparams for GetTrackedQueries * Added sqlparams for High Variation * Added Overall ResourceConumption * Adding params for regressed queries * Removing WithWaitStats calls, since they're automatically used within QSM when waitstats is an available statistic# * Adding PlanSummary handlers * cleaning up orderable queries * initial test mockout * adding basic (incorrect) parameter translation * first test passing, datetimeoffset swapped to ISO format * Adding test baselines * Updating nuget package * Adding get/set * Adding get/set for result object * Switching to parameter-less constructor * Swapping TimeInterval for string-based BasicTimeInterval * Removing unnecessary usings * Adding back params comments * Fixing up request docstrings * comment tweak * fix tests failing in pipeline because of line endings not matching * removing unnecessary usings * Setting tests to generate queries in UTC for test stability * Normalizing line endings --------- Co-authored-by: Kim Santiago <kisantia@microsoft.com>
49 lines
1.7 KiB
C#
49 lines
1.7 KiB
C#
//
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
//
|
|
|
|
using Microsoft.SqlServer.Management.QueryStoreModel.Common;
|
|
using Microsoft.SqlServer.Management.QueryStoreModel.OverallResourceConsumption;
|
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
|
|
|
#nullable disable
|
|
|
|
namespace Microsoft.SqlTools.ServiceLayer.QueryStore.Contracts
|
|
{
|
|
/// <summary>
|
|
/// Parameters for getting an Overall Resource Consumption report
|
|
/// </summary>
|
|
public class GetOverallResourceConsumptionReportParams : QueryConfigurationParams<OverallResourceConsumptionConfiguration>
|
|
{
|
|
/// <summary>
|
|
/// Time interval for the report
|
|
/// </summary>
|
|
public BasicTimeInterval SpecifiedTimeInterval { get; set; }
|
|
|
|
/// <summary>
|
|
/// Bucket interval for the report
|
|
/// </summary>
|
|
public BucketInterval SpecifiedBucketInterval { get; set; }
|
|
|
|
public override OverallResourceConsumptionConfiguration Convert()
|
|
{
|
|
OverallResourceConsumptionConfiguration result = base.Convert();
|
|
|
|
result.SpecifiedTimeInterval = SpecifiedTimeInterval.Convert();
|
|
result.SelectedBucketInterval = SpecifiedBucketInterval;
|
|
|
|
return result;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the query for an Overall Resource Consumption report
|
|
/// </summary>
|
|
public class GetOverallResourceConsumptionReportRequest
|
|
{
|
|
public static readonly RequestType<GetOverallResourceConsumptionReportParams, QueryStoreQueryResult> Type
|
|
= RequestType<GetOverallResourceConsumptionReportParams, QueryStoreQueryResult>.Create("queryStore/getOverallResourceConsumptionReport");
|
|
}
|
|
}
|