mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-22 02:11:29 +00:00
Wmt priority execution feature (#1546)
* Execute the queries with high/low priority * improvement made to the Cosmos client and created separate plugin class for setting priority header * added test cases for the priority execution utility * removed unwanted code * fix compile time issues * fix compile time issues * fixed lint and stylinkg issues * fixed lint and styling issues * skip the lint check for src/Utils/PriorityBasedExecutionUtils.ts * incorporating review comments, added the default priority level changes * changed the priority to default instead of low * removed the unwanted if condition --------- Co-authored-by: Faiz Chachiya <faizchachiya@microsoft.com>
This commit is contained in:
@@ -6,6 +6,7 @@ export const createDefaultSettings = () => {
|
||||
LocalStorageUtility.setEntryNumber(StorageKey.CustomItemPerPage, Constants.Queries.itemsPerPage);
|
||||
LocalStorageUtility.setEntryString(StorageKey.IsCrossPartitionQueryEnabled, "true");
|
||||
LocalStorageUtility.setEntryNumber(StorageKey.MaxDegreeOfParellism, Constants.Queries.DefaultMaxDegreeOfParallelism);
|
||||
LocalStorageUtility.setEntryString(StorageKey.PriorityLevel, Constants.PriorityLevel.Default);
|
||||
};
|
||||
|
||||
export const hasSettingsDefined = (): boolean => {
|
||||
@@ -15,3 +16,9 @@ export const hasSettingsDefined = (): boolean => {
|
||||
LocalStorageUtility.hasItem(StorageKey.MaxDegreeOfParellism)
|
||||
);
|
||||
};
|
||||
|
||||
export const ensurePriorityLevel = () => {
|
||||
if (!LocalStorageUtility.hasItem(StorageKey.PriorityLevel)) {
|
||||
LocalStorageUtility.setEntryString(StorageKey.PriorityLevel, Constants.PriorityLevel.Default);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,4 +16,5 @@ export enum StorageKey {
|
||||
SetPartitionKeyUndefined,
|
||||
GalleryCalloutDismissed,
|
||||
VisitedAccounts,
|
||||
PriorityLevel,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user