@itwin/ecschema-metadata 5.2.0-dev.17 → 5.2.0-dev.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/lib/cjs/Constants.js.map +1 -1
  2. package/lib/cjs/DelayedPromise.js.map +1 -1
  3. package/lib/cjs/Deserialization/AbstractParser.js.map +1 -1
  4. package/lib/cjs/Deserialization/Helper.js.map +1 -1
  5. package/lib/cjs/Deserialization/JsonParser.js.map +1 -1
  6. package/lib/cjs/Deserialization/JsonProps.d.ts +7 -2
  7. package/lib/cjs/Deserialization/JsonProps.d.ts.map +1 -1
  8. package/lib/cjs/Deserialization/JsonProps.js.map +1 -1
  9. package/lib/cjs/Deserialization/SchemaGraphUtil.js.map +1 -1
  10. package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
  11. package/lib/cjs/Deserialization/XmlSerializationUtils.js.map +1 -1
  12. package/lib/cjs/ECName.js.map +1 -1
  13. package/lib/cjs/ECObjects.js.map +1 -1
  14. package/lib/cjs/Exception.js.map +1 -1
  15. package/lib/cjs/Formatting/FormatSetFormatsProvider.js.map +1 -1
  16. package/lib/cjs/Formatting/SchemaFormatsProvider.js.map +1 -1
  17. package/lib/cjs/IncrementalLoading/ClassParsers.js.map +1 -1
  18. package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.d.ts +18 -24
  19. package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.d.ts.map +1 -1
  20. package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.js +40 -20
  21. package/lib/cjs/IncrementalLoading/ECSqlSchemaLocater.js.map +1 -1
  22. package/lib/cjs/IncrementalLoading/FullSchemaQueries.js +465 -465
  23. package/lib/cjs/IncrementalLoading/FullSchemaQueries.js.map +1 -1
  24. package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.d.ts +2 -2
  25. package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.d.ts.map +1 -1
  26. package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.js +5 -4
  27. package/lib/cjs/IncrementalLoading/IncrementalSchemaLocater.js.map +1 -1
  28. package/lib/cjs/IncrementalLoading/IncrementalSchemaReader.d.ts.map +1 -1
  29. package/lib/cjs/IncrementalLoading/IncrementalSchemaReader.js +1 -0
  30. package/lib/cjs/IncrementalLoading/IncrementalSchemaReader.js.map +1 -1
  31. package/lib/cjs/IncrementalLoading/SchemaItemParsers.js.map +1 -1
  32. package/lib/cjs/IncrementalLoading/SchemaItemQueries.js +235 -235
  33. package/lib/cjs/IncrementalLoading/SchemaItemQueries.js.map +1 -1
  34. package/lib/cjs/IncrementalLoading/SchemaParser.d.ts +8 -2
  35. package/lib/cjs/IncrementalLoading/SchemaParser.d.ts.map +1 -1
  36. package/lib/cjs/IncrementalLoading/SchemaParser.js +6 -6
  37. package/lib/cjs/IncrementalLoading/SchemaParser.js.map +1 -1
  38. package/lib/cjs/IncrementalLoading/SchemaStubQueries.js +326 -326
  39. package/lib/cjs/IncrementalLoading/SchemaStubQueries.js.map +1 -1
  40. package/lib/cjs/Interfaces.js.map +1 -1
  41. package/lib/cjs/Metadata/Class.js.map +1 -1
  42. package/lib/cjs/Metadata/Constant.js.map +1 -1
  43. package/lib/cjs/Metadata/CustomAttribute.js.map +1 -1
  44. package/lib/cjs/Metadata/CustomAttributeClass.js.map +1 -1
  45. package/lib/cjs/Metadata/EntityClass.js.map +1 -1
  46. package/lib/cjs/Metadata/Enumeration.js.map +1 -1
  47. package/lib/cjs/Metadata/Format.js.map +1 -1
  48. package/lib/cjs/Metadata/InvertedUnit.js.map +1 -1
  49. package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
  50. package/lib/cjs/Metadata/Mixin.js.map +1 -1
  51. package/lib/cjs/Metadata/OverrideFormat.js.map +1 -1
  52. package/lib/cjs/Metadata/Phenomenon.js.map +1 -1
  53. package/lib/cjs/Metadata/Property.js.map +1 -1
  54. package/lib/cjs/Metadata/PropertyCategory.js.map +1 -1
  55. package/lib/cjs/Metadata/RelationshipClass.js.map +1 -1
  56. package/lib/cjs/Metadata/Schema.js.map +1 -1
  57. package/lib/cjs/Metadata/SchemaItem.js.map +1 -1
  58. package/lib/cjs/Metadata/UnitSystem.js.map +1 -1
  59. package/lib/cjs/PropertyTypes.js.map +1 -1
  60. package/lib/cjs/SchemaJsonLocater.js.map +1 -1
  61. package/lib/cjs/SchemaKey.js.map +1 -1
  62. package/lib/cjs/SchemaLoader.js.map +1 -1
  63. package/lib/cjs/SchemaPartVisitorDelegate.js.map +1 -1
  64. package/lib/cjs/UnitConversion/Graph.js.map +1 -1
  65. package/lib/cjs/UnitConversion/Parser.js.map +1 -1
  66. package/lib/cjs/UnitConversion/UnitConversion.js.map +1 -1
  67. package/lib/cjs/UnitConversion/UnitConverter.js.map +1 -1
  68. package/lib/cjs/UnitConversion/UnitTree.js.map +1 -1
  69. package/lib/cjs/UnitProvider/SchemaUnitProvider.js.map +1 -1
  70. package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
  71. package/lib/cjs/ecschema-metadata.js.map +1 -1
  72. package/lib/cjs/utils/SchemaGraph.js.map +1 -1
  73. package/lib/cjs/utils/SchemaLoadingController.js.map +1 -1
  74. package/lib/esm/Constants.js.map +1 -1
  75. package/lib/esm/DelayedPromise.js.map +1 -1
  76. package/lib/esm/Deserialization/AbstractParser.js.map +1 -1
  77. package/lib/esm/Deserialization/Helper.js.map +1 -1
  78. package/lib/esm/Deserialization/JsonParser.js.map +1 -1
  79. package/lib/esm/Deserialization/JsonProps.d.ts +7 -2
  80. package/lib/esm/Deserialization/JsonProps.d.ts.map +1 -1
  81. package/lib/esm/Deserialization/JsonProps.js.map +1 -1
  82. package/lib/esm/Deserialization/SchemaGraphUtil.js.map +1 -1
  83. package/lib/esm/Deserialization/XmlParser.js.map +1 -1
  84. package/lib/esm/Deserialization/XmlSerializationUtils.js.map +1 -1
  85. package/lib/esm/ECName.js.map +1 -1
  86. package/lib/esm/ECObjects.js.map +1 -1
  87. package/lib/esm/Exception.js.map +1 -1
  88. package/lib/esm/Formatting/FormatSetFormatsProvider.js.map +1 -1
  89. package/lib/esm/Formatting/SchemaFormatsProvider.js.map +1 -1
  90. package/lib/esm/IncrementalLoading/ClassParsers.js.map +1 -1
  91. package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.d.ts +18 -24
  92. package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.d.ts.map +1 -1
  93. package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.js +39 -19
  94. package/lib/esm/IncrementalLoading/ECSqlSchemaLocater.js.map +1 -1
  95. package/lib/esm/IncrementalLoading/FullSchemaQueries.js +465 -465
  96. package/lib/esm/IncrementalLoading/FullSchemaQueries.js.map +1 -1
  97. package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.d.ts +2 -2
  98. package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.d.ts.map +1 -1
  99. package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.js +5 -4
  100. package/lib/esm/IncrementalLoading/IncrementalSchemaLocater.js.map +1 -1
  101. package/lib/esm/IncrementalLoading/IncrementalSchemaReader.d.ts.map +1 -1
  102. package/lib/esm/IncrementalLoading/IncrementalSchemaReader.js +1 -0
  103. package/lib/esm/IncrementalLoading/IncrementalSchemaReader.js.map +1 -1
  104. package/lib/esm/IncrementalLoading/SchemaItemParsers.js.map +1 -1
  105. package/lib/esm/IncrementalLoading/SchemaItemQueries.js +235 -235
  106. package/lib/esm/IncrementalLoading/SchemaItemQueries.js.map +1 -1
  107. package/lib/esm/IncrementalLoading/SchemaParser.d.ts +8 -2
  108. package/lib/esm/IncrementalLoading/SchemaParser.d.ts.map +1 -1
  109. package/lib/esm/IncrementalLoading/SchemaParser.js +6 -6
  110. package/lib/esm/IncrementalLoading/SchemaParser.js.map +1 -1
  111. package/lib/esm/IncrementalLoading/SchemaStubQueries.js +326 -326
  112. package/lib/esm/IncrementalLoading/SchemaStubQueries.js.map +1 -1
  113. package/lib/esm/Interfaces.js.map +1 -1
  114. package/lib/esm/Metadata/Class.js.map +1 -1
  115. package/lib/esm/Metadata/Constant.js.map +1 -1
  116. package/lib/esm/Metadata/CustomAttribute.js.map +1 -1
  117. package/lib/esm/Metadata/CustomAttributeClass.js.map +1 -1
  118. package/lib/esm/Metadata/EntityClass.js.map +1 -1
  119. package/lib/esm/Metadata/Enumeration.js.map +1 -1
  120. package/lib/esm/Metadata/Format.js.map +1 -1
  121. package/lib/esm/Metadata/InvertedUnit.js.map +1 -1
  122. package/lib/esm/Metadata/KindOfQuantity.js.map +1 -1
  123. package/lib/esm/Metadata/Mixin.js.map +1 -1
  124. package/lib/esm/Metadata/OverrideFormat.js.map +1 -1
  125. package/lib/esm/Metadata/Phenomenon.js.map +1 -1
  126. package/lib/esm/Metadata/Property.js.map +1 -1
  127. package/lib/esm/Metadata/PropertyCategory.js.map +1 -1
  128. package/lib/esm/Metadata/RelationshipClass.js.map +1 -1
  129. package/lib/esm/Metadata/Schema.js.map +1 -1
  130. package/lib/esm/Metadata/SchemaItem.js.map +1 -1
  131. package/lib/esm/Metadata/UnitSystem.js.map +1 -1
  132. package/lib/esm/PropertyTypes.js.map +1 -1
  133. package/lib/esm/SchemaJsonLocater.js.map +1 -1
  134. package/lib/esm/SchemaKey.js.map +1 -1
  135. package/lib/esm/SchemaLoader.js.map +1 -1
  136. package/lib/esm/SchemaPartVisitorDelegate.js.map +1 -1
  137. package/lib/esm/UnitConversion/Graph.js.map +1 -1
  138. package/lib/esm/UnitConversion/Parser.js.map +1 -1
  139. package/lib/esm/UnitConversion/UnitConversion.js.map +1 -1
  140. package/lib/esm/UnitConversion/UnitConverter.js.map +1 -1
  141. package/lib/esm/UnitConversion/UnitTree.js.map +1 -1
  142. package/lib/esm/UnitProvider/SchemaUnitProvider.js.map +1 -1
  143. package/lib/esm/Validation/SchemaWalker.js.map +1 -1
  144. package/lib/esm/ecschema-metadata.js.map +1 -1
  145. package/lib/esm/utils/SchemaGraph.js.map +1 -1
  146. package/lib/esm/utils/SchemaLoadingController.js.map +1 -1
  147. package/package.json +6 -6
  148. package/lib/cjs/IncrementalLoading/PerformanceLogger.d.ts +0 -60
  149. package/lib/cjs/IncrementalLoading/PerformanceLogger.d.ts.map +0 -1
  150. package/lib/cjs/IncrementalLoading/PerformanceLogger.js +0 -82
  151. package/lib/cjs/IncrementalLoading/PerformanceLogger.js.map +0 -1
  152. package/lib/esm/IncrementalLoading/PerformanceLogger.d.ts +0 -60
  153. package/lib/esm/IncrementalLoading/PerformanceLogger.d.ts.map +0 -1
  154. package/lib/esm/IncrementalLoading/PerformanceLogger.js +0 -78
  155. package/lib/esm/IncrementalLoading/PerformanceLogger.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/ecschema-metadata",
3
- "version": "5.2.0-dev.17",
3
+ "version": "5.2.0-dev.19",
4
4
  "description": "ECObjects core concepts in typescript",
5
5
  "license": "MIT",
6
6
  "main": "lib/cjs/ecschema-metadata.js",
@@ -48,13 +48,13 @@
48
48
  "rimraf": "^6.0.1",
49
49
  "sinon": "^17.0.2",
50
50
  "typescript": "~5.6.2",
51
- "@itwin/build-tools": "5.2.0-dev.17",
52
- "@itwin/core-bentley": "5.2.0-dev.17",
53
- "@itwin/core-quantity": "5.2.0-dev.17"
51
+ "@itwin/build-tools": "5.2.0-dev.19",
52
+ "@itwin/core-bentley": "5.2.0-dev.19",
53
+ "@itwin/core-quantity": "5.2.0-dev.19"
54
54
  },
55
55
  "peerDependencies": {
56
- "@itwin/core-bentley": "5.2.0-dev.17",
57
- "@itwin/core-quantity": "5.2.0-dev.17"
56
+ "@itwin/core-bentley": "5.2.0-dev.19",
57
+ "@itwin/core-quantity": "5.2.0-dev.19"
58
58
  },
59
59
  "nyc": {
60
60
  "extends": "./node_modules/@itwin/build-tools/.nycrc"
@@ -1,60 +0,0 @@
1
- /**
2
- * Contains the properties needed to track load times
3
- * for SchemaItem queries.
4
- * @internal
5
- */
6
- export interface SchemaItemLoadData {
7
- loadTime: number;
8
- itemCount: number;
9
- }
10
- /**
11
- * Contains the properties needed to track load times
12
- * for Schema queries.
13
- * @internal
14
- */
15
- export interface SchemaLoadData {
16
- loadTime?: number;
17
- schemaItemMap: Map<string, SchemaItemLoadData>;
18
- }
19
- /**
20
- * Utility class used to log query load times for Schema and
21
- * SchemaItem queries.
22
- * @internal
23
- */
24
- export declare class PerformanceLogger {
25
- private _iModelItems;
26
- private _label;
27
- disableLogging: boolean;
28
- /**
29
- * Initializes a new PerformanceLogger instance.
30
- * @param label Arbitrary label used to tag this logging session (ex. IModel name)
31
- */
32
- constructor(label?: string);
33
- /**
34
- * Gets the Map of logged Schema entries. The Map key is the iModel name. The Map
35
- * value is a second Map whose key is a Schema name and value is a SchemaLoadData
36
- * object.
37
- */
38
- get logItems(): Map<string, Map<string, SchemaLoadData>>;
39
- /**
40
- * Adds a new log entry to the Schema Map.
41
- * @param startTime The start time of the entry to be logged (end time/duration is handled in this method).
42
- * @param schemaName The Schema being queried.
43
- */
44
- logSchema(startTime: number, schemaName: string): void;
45
- /**
46
- * Adds a new log entry to the SchemaItem Map.
47
- * @param startTime The start time of the entry to be logged (end time/duration is handled in this method).
48
- * @param schemaName The name of the Schema being queried.
49
- * @param schemaItemType The SchemaItemType name of the type being queried.
50
- * @param itemCount The number of items retrieved in the query.
51
- */
52
- logSchemaItem(startTime: number, schemaName: string, schemaItemType: string, itemCount: number): void;
53
- /**
54
- * Clears all log entries from the Map.
55
- */
56
- clearLogs(): void;
57
- private getSchemaMap;
58
- private getSchemaLoadData;
59
- }
60
- //# sourceMappingURL=PerformanceLogger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PerformanceLogger.d.ts","sourceRoot":"","sources":["../../../src/IncrementalLoading/PerformanceLogger.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CAChD;AAED;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,YAAY,CAAuD;IAC3E,OAAO,CAAC,MAAM,CAAS;IAGhB,cAAc,UAAS;IAE9B;;;OAGG;gBACS,KAAK,CAAC,EAAE,MAAM;IAI1B;;;;OAIG;IACH,IAAW,QAAQ,IAAI,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAE9D;IAED;;;;OAIG;IACI,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAYtD;;;;;;OAMG;IACI,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAerG;;OAEG;IACI,SAAS;IAIhB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,iBAAiB;CAM1B"}
@@ -1,82 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.PerformanceLogger = void 0;
8
- /**
9
- * Utility class used to log query load times for Schema and
10
- * SchemaItem queries.
11
- * @internal
12
- */
13
- class PerformanceLogger {
14
- _iModelItems = new Map();
15
- _label;
16
- // flag that controls if logging is enabled.
17
- disableLogging = false;
18
- /**
19
- * Initializes a new PerformanceLogger instance.
20
- * @param label Arbitrary label used to tag this logging session (ex. IModel name)
21
- */
22
- constructor(label) {
23
- this._label = label || "";
24
- }
25
- /**
26
- * Gets the Map of logged Schema entries. The Map key is the iModel name. The Map
27
- * value is a second Map whose key is a Schema name and value is a SchemaLoadData
28
- * object.
29
- */
30
- get logItems() {
31
- return this._iModelItems;
32
- }
33
- /**
34
- * Adds a new log entry to the Schema Map.
35
- * @param startTime The start time of the entry to be logged (end time/duration is handled in this method).
36
- * @param schemaName The Schema being queried.
37
- */
38
- logSchema(startTime, schemaName) {
39
- if (this.disableLogging)
40
- return;
41
- const loadTime = new Date().getTime() - startTime;
42
- const schemaMap = this.getSchemaMap(this._label);
43
- const schemaLoadData = this.getSchemaLoadData(schemaMap, schemaName);
44
- schemaLoadData.loadTime = loadTime;
45
- }
46
- /**
47
- * Adds a new log entry to the SchemaItem Map.
48
- * @param startTime The start time of the entry to be logged (end time/duration is handled in this method).
49
- * @param schemaName The name of the Schema being queried.
50
- * @param schemaItemType The SchemaItemType name of the type being queried.
51
- * @param itemCount The number of items retrieved in the query.
52
- */
53
- logSchemaItem(startTime, schemaName, schemaItemType, itemCount) {
54
- if (this.disableLogging)
55
- return;
56
- const loadTime = new Date().getTime() - startTime;
57
- const schemaMap = this.getSchemaMap(this._label);
58
- const schemaLoadData = this.getSchemaLoadData(schemaMap, schemaName);
59
- if (schemaLoadData.schemaItemMap.has(schemaItemType))
60
- throw new Error("There should not be a multiple load times for a given iModel, Schema, SchemaItemType combination.");
61
- schemaLoadData.schemaItemMap.set(schemaItemType, { loadTime, itemCount });
62
- }
63
- /**
64
- * Clears all log entries from the Map.
65
- */
66
- clearLogs() {
67
- this._iModelItems.clear();
68
- }
69
- getSchemaMap(iModel) {
70
- if (!this._iModelItems.has(iModel)) {
71
- this._iModelItems.set(iModel, new Map());
72
- }
73
- return this._iModelItems.get(iModel);
74
- }
75
- getSchemaLoadData(schemaMap, schemaName) {
76
- if (!schemaMap.has(schemaName))
77
- schemaMap.set(schemaName, { schemaItemMap: new Map() });
78
- return schemaMap.get(schemaName);
79
- }
80
- }
81
- exports.PerformanceLogger = PerformanceLogger;
82
- //# sourceMappingURL=PerformanceLogger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PerformanceLogger.js","sourceRoot":"","sources":["../../../src/IncrementalLoading/PerformanceLogger.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAsBhG;;;;GAIG;AACH,MAAa,iBAAiB;IACpB,YAAY,GAA6C,IAAI,GAAG,EAAE,CAAC;IACnE,MAAM,CAAS;IAEvB,4CAA4C;IACrC,cAAc,GAAG,KAAK,CAAC;IAE9B;;;OAGG;IACH,YAAY,KAAc;QACxB,IAAI,CAAC,MAAM,GAAG,KAAK,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACI,SAAS,CAAC,SAAiB,EAAE,UAAkB;QACpD,IAAI,IAAI,CAAC,cAAc;YACrB,OAAO;QAET,MAAM,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC;QAElD,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACjD,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAErE,cAAc,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACrC,CAAC;IAED;;;;;;OAMG;IACI,aAAa,CAAC,SAAiB,EAAE,UAAkB,EAAE,cAAsB,EAAE,SAAiB;QACnG,IAAI,IAAI,CAAC,cAAc;YACrB,OAAO;QAET,MAAM,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC;QAElD,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACjD,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAErE,IAAI,cAAc,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC;YAClD,MAAM,IAAI,KAAK,CAAC,mGAAmG,CAAC,CAAC;QAEvH,cAAc,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACI,SAAS;QACd,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAEO,YAAY,CAAC,MAAc;QACjC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QAC3C,CAAC;QAED,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAgC,CAAC;IACtE,CAAC;IAEO,iBAAiB,CAAC,SAAsC,EAAE,UAAkB;QAClF,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC;YAC5B,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC,CAAA;QAEzD,OAAO,SAAS,CAAC,GAAG,CAAC,UAAU,CAAmB,CAAC;IACrD,CAAC;CACF;AApFD,8CAoFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/**\n * Contains the properties needed to track load times\n * for SchemaItem queries.\n * @internal\n */\nexport interface SchemaItemLoadData {\n loadTime: number,\n itemCount: number\n}\n\n/**\n * Contains the properties needed to track load times\n * for Schema queries.\n * @internal\n */\nexport interface SchemaLoadData {\n loadTime?: number,\n schemaItemMap: Map<string, SchemaItemLoadData>;\n}\n\n/**\n * Utility class used to log query load times for Schema and\n * SchemaItem queries.\n * @internal\n */\nexport class PerformanceLogger {\n private _iModelItems: Map<string, Map<string, SchemaLoadData>> = new Map();\n private _label: string;\n\n // flag that controls if logging is enabled.\n public disableLogging = false;\n\n /**\n * Initializes a new PerformanceLogger instance.\n * @param label Arbitrary label used to tag this logging session (ex. IModel name)\n */\n constructor(label?: string) {\n this._label = label || \"\";\n }\n\n /**\n * Gets the Map of logged Schema entries. The Map key is the iModel name. The Map\n * value is a second Map whose key is a Schema name and value is a SchemaLoadData\n * object.\n */\n public get logItems(): Map<string, Map<string, SchemaLoadData>> {\n return this._iModelItems;\n }\n\n /**\n * Adds a new log entry to the Schema Map.\n * @param startTime The start time of the entry to be logged (end time/duration is handled in this method).\n * @param schemaName The Schema being queried.\n */\n public logSchema(startTime: number, schemaName: string) {\n if (this.disableLogging)\n return;\n\n const loadTime = new Date().getTime() - startTime;\n\n const schemaMap = this.getSchemaMap(this._label);\n const schemaLoadData = this.getSchemaLoadData(schemaMap, schemaName);\n\n schemaLoadData.loadTime = loadTime;\n }\n\n /**\n * Adds a new log entry to the SchemaItem Map.\n * @param startTime The start time of the entry to be logged (end time/duration is handled in this method).\n * @param schemaName The name of the Schema being queried.\n * @param schemaItemType The SchemaItemType name of the type being queried.\n * @param itemCount The number of items retrieved in the query.\n */\n public logSchemaItem(startTime: number, schemaName: string, schemaItemType: string, itemCount: number) {\n if (this.disableLogging)\n return;\n\n const loadTime = new Date().getTime() - startTime;\n\n const schemaMap = this.getSchemaMap(this._label);\n const schemaLoadData = this.getSchemaLoadData(schemaMap, schemaName);\n\n if (schemaLoadData.schemaItemMap.has(schemaItemType))\n throw new Error(\"There should not be a multiple load times for a given iModel, Schema, SchemaItemType combination.\");\n\n schemaLoadData.schemaItemMap.set(schemaItemType, { loadTime, itemCount });\n }\n\n /**\n * Clears all log entries from the Map.\n */\n public clearLogs() {\n this._iModelItems.clear();\n }\n\n private getSchemaMap(iModel: string): Map<string, SchemaLoadData> {\n if (!this._iModelItems.has(iModel)) {\n this._iModelItems.set(iModel, new Map());\n }\n\n return this._iModelItems.get(iModel) as Map<string, SchemaLoadData>;\n }\n\n private getSchemaLoadData(schemaMap: Map<string, SchemaLoadData>, schemaName: string): SchemaLoadData {\n if (!schemaMap.has(schemaName))\n schemaMap.set(schemaName, { schemaItemMap: new Map() })\n\n return schemaMap.get(schemaName) as SchemaLoadData;\n }\n}"]}
@@ -1,60 +0,0 @@
1
- /**
2
- * Contains the properties needed to track load times
3
- * for SchemaItem queries.
4
- * @internal
5
- */
6
- export interface SchemaItemLoadData {
7
- loadTime: number;
8
- itemCount: number;
9
- }
10
- /**
11
- * Contains the properties needed to track load times
12
- * for Schema queries.
13
- * @internal
14
- */
15
- export interface SchemaLoadData {
16
- loadTime?: number;
17
- schemaItemMap: Map<string, SchemaItemLoadData>;
18
- }
19
- /**
20
- * Utility class used to log query load times for Schema and
21
- * SchemaItem queries.
22
- * @internal
23
- */
24
- export declare class PerformanceLogger {
25
- private _iModelItems;
26
- private _label;
27
- disableLogging: boolean;
28
- /**
29
- * Initializes a new PerformanceLogger instance.
30
- * @param label Arbitrary label used to tag this logging session (ex. IModel name)
31
- */
32
- constructor(label?: string);
33
- /**
34
- * Gets the Map of logged Schema entries. The Map key is the iModel name. The Map
35
- * value is a second Map whose key is a Schema name and value is a SchemaLoadData
36
- * object.
37
- */
38
- get logItems(): Map<string, Map<string, SchemaLoadData>>;
39
- /**
40
- * Adds a new log entry to the Schema Map.
41
- * @param startTime The start time of the entry to be logged (end time/duration is handled in this method).
42
- * @param schemaName The Schema being queried.
43
- */
44
- logSchema(startTime: number, schemaName: string): void;
45
- /**
46
- * Adds a new log entry to the SchemaItem Map.
47
- * @param startTime The start time of the entry to be logged (end time/duration is handled in this method).
48
- * @param schemaName The name of the Schema being queried.
49
- * @param schemaItemType The SchemaItemType name of the type being queried.
50
- * @param itemCount The number of items retrieved in the query.
51
- */
52
- logSchemaItem(startTime: number, schemaName: string, schemaItemType: string, itemCount: number): void;
53
- /**
54
- * Clears all log entries from the Map.
55
- */
56
- clearLogs(): void;
57
- private getSchemaMap;
58
- private getSchemaLoadData;
59
- }
60
- //# sourceMappingURL=PerformanceLogger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PerformanceLogger.d.ts","sourceRoot":"","sources":["../../../src/IncrementalLoading/PerformanceLogger.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CAChD;AAED;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,YAAY,CAAuD;IAC3E,OAAO,CAAC,MAAM,CAAS;IAGhB,cAAc,UAAS;IAE9B;;;OAGG;gBACS,KAAK,CAAC,EAAE,MAAM;IAI1B;;;;OAIG;IACH,IAAW,QAAQ,IAAI,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAE9D;IAED;;;;OAIG;IACI,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAYtD;;;;;;OAMG;IACI,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAerG;;OAEG;IACI,SAAS;IAIhB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,iBAAiB;CAM1B"}
@@ -1,78 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- /**
6
- * Utility class used to log query load times for Schema and
7
- * SchemaItem queries.
8
- * @internal
9
- */
10
- export class PerformanceLogger {
11
- _iModelItems = new Map();
12
- _label;
13
- // flag that controls if logging is enabled.
14
- disableLogging = false;
15
- /**
16
- * Initializes a new PerformanceLogger instance.
17
- * @param label Arbitrary label used to tag this logging session (ex. IModel name)
18
- */
19
- constructor(label) {
20
- this._label = label || "";
21
- }
22
- /**
23
- * Gets the Map of logged Schema entries. The Map key is the iModel name. The Map
24
- * value is a second Map whose key is a Schema name and value is a SchemaLoadData
25
- * object.
26
- */
27
- get logItems() {
28
- return this._iModelItems;
29
- }
30
- /**
31
- * Adds a new log entry to the Schema Map.
32
- * @param startTime The start time of the entry to be logged (end time/duration is handled in this method).
33
- * @param schemaName The Schema being queried.
34
- */
35
- logSchema(startTime, schemaName) {
36
- if (this.disableLogging)
37
- return;
38
- const loadTime = new Date().getTime() - startTime;
39
- const schemaMap = this.getSchemaMap(this._label);
40
- const schemaLoadData = this.getSchemaLoadData(schemaMap, schemaName);
41
- schemaLoadData.loadTime = loadTime;
42
- }
43
- /**
44
- * Adds a new log entry to the SchemaItem Map.
45
- * @param startTime The start time of the entry to be logged (end time/duration is handled in this method).
46
- * @param schemaName The name of the Schema being queried.
47
- * @param schemaItemType The SchemaItemType name of the type being queried.
48
- * @param itemCount The number of items retrieved in the query.
49
- */
50
- logSchemaItem(startTime, schemaName, schemaItemType, itemCount) {
51
- if (this.disableLogging)
52
- return;
53
- const loadTime = new Date().getTime() - startTime;
54
- const schemaMap = this.getSchemaMap(this._label);
55
- const schemaLoadData = this.getSchemaLoadData(schemaMap, schemaName);
56
- if (schemaLoadData.schemaItemMap.has(schemaItemType))
57
- throw new Error("There should not be a multiple load times for a given iModel, Schema, SchemaItemType combination.");
58
- schemaLoadData.schemaItemMap.set(schemaItemType, { loadTime, itemCount });
59
- }
60
- /**
61
- * Clears all log entries from the Map.
62
- */
63
- clearLogs() {
64
- this._iModelItems.clear();
65
- }
66
- getSchemaMap(iModel) {
67
- if (!this._iModelItems.has(iModel)) {
68
- this._iModelItems.set(iModel, new Map());
69
- }
70
- return this._iModelItems.get(iModel);
71
- }
72
- getSchemaLoadData(schemaMap, schemaName) {
73
- if (!schemaMap.has(schemaName))
74
- schemaMap.set(schemaName, { schemaItemMap: new Map() });
75
- return schemaMap.get(schemaName);
76
- }
77
- }
78
- //# sourceMappingURL=PerformanceLogger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PerformanceLogger.js","sourceRoot":"","sources":["../../../src/IncrementalLoading/PerformanceLogger.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAsBhG;;;;GAIG;AACH,MAAM,OAAO,iBAAiB;IACpB,YAAY,GAA6C,IAAI,GAAG,EAAE,CAAC;IACnE,MAAM,CAAS;IAEvB,4CAA4C;IACrC,cAAc,GAAG,KAAK,CAAC;IAE9B;;;OAGG;IACH,YAAY,KAAc;QACxB,IAAI,CAAC,MAAM,GAAG,KAAK,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED;;;;OAIG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACI,SAAS,CAAC,SAAiB,EAAE,UAAkB;QACpD,IAAI,IAAI,CAAC,cAAc;YACrB,OAAO;QAET,MAAM,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC;QAElD,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACjD,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAErE,cAAc,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACrC,CAAC;IAED;;;;;;OAMG;IACI,aAAa,CAAC,SAAiB,EAAE,UAAkB,EAAE,cAAsB,EAAE,SAAiB;QACnG,IAAI,IAAI,CAAC,cAAc;YACrB,OAAO;QAET,MAAM,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC;QAElD,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACjD,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAErE,IAAI,cAAc,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC;YAClD,MAAM,IAAI,KAAK,CAAC,mGAAmG,CAAC,CAAC;QAEvH,cAAc,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACI,SAAS;QACd,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAEO,YAAY,CAAC,MAAc;QACjC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QAC3C,CAAC;QAED,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAgC,CAAC;IACtE,CAAC;IAEO,iBAAiB,CAAC,SAAsC,EAAE,UAAkB;QAClF,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC;YAC5B,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC,CAAA;QAEzD,OAAO,SAAS,CAAC,GAAG,CAAC,UAAU,CAAmB,CAAC;IACrD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/**\n * Contains the properties needed to track load times\n * for SchemaItem queries.\n * @internal\n */\nexport interface SchemaItemLoadData {\n loadTime: number,\n itemCount: number\n}\n\n/**\n * Contains the properties needed to track load times\n * for Schema queries.\n * @internal\n */\nexport interface SchemaLoadData {\n loadTime?: number,\n schemaItemMap: Map<string, SchemaItemLoadData>;\n}\n\n/**\n * Utility class used to log query load times for Schema and\n * SchemaItem queries.\n * @internal\n */\nexport class PerformanceLogger {\n private _iModelItems: Map<string, Map<string, SchemaLoadData>> = new Map();\n private _label: string;\n\n // flag that controls if logging is enabled.\n public disableLogging = false;\n\n /**\n * Initializes a new PerformanceLogger instance.\n * @param label Arbitrary label used to tag this logging session (ex. IModel name)\n */\n constructor(label?: string) {\n this._label = label || \"\";\n }\n\n /**\n * Gets the Map of logged Schema entries. The Map key is the iModel name. The Map\n * value is a second Map whose key is a Schema name and value is a SchemaLoadData\n * object.\n */\n public get logItems(): Map<string, Map<string, SchemaLoadData>> {\n return this._iModelItems;\n }\n\n /**\n * Adds a new log entry to the Schema Map.\n * @param startTime The start time of the entry to be logged (end time/duration is handled in this method).\n * @param schemaName The Schema being queried.\n */\n public logSchema(startTime: number, schemaName: string) {\n if (this.disableLogging)\n return;\n\n const loadTime = new Date().getTime() - startTime;\n\n const schemaMap = this.getSchemaMap(this._label);\n const schemaLoadData = this.getSchemaLoadData(schemaMap, schemaName);\n\n schemaLoadData.loadTime = loadTime;\n }\n\n /**\n * Adds a new log entry to the SchemaItem Map.\n * @param startTime The start time of the entry to be logged (end time/duration is handled in this method).\n * @param schemaName The name of the Schema being queried.\n * @param schemaItemType The SchemaItemType name of the type being queried.\n * @param itemCount The number of items retrieved in the query.\n */\n public logSchemaItem(startTime: number, schemaName: string, schemaItemType: string, itemCount: number) {\n if (this.disableLogging)\n return;\n\n const loadTime = new Date().getTime() - startTime;\n\n const schemaMap = this.getSchemaMap(this._label);\n const schemaLoadData = this.getSchemaLoadData(schemaMap, schemaName);\n\n if (schemaLoadData.schemaItemMap.has(schemaItemType))\n throw new Error(\"There should not be a multiple load times for a given iModel, Schema, SchemaItemType combination.\");\n\n schemaLoadData.schemaItemMap.set(schemaItemType, { loadTime, itemCount });\n }\n\n /**\n * Clears all log entries from the Map.\n */\n public clearLogs() {\n this._iModelItems.clear();\n }\n\n private getSchemaMap(iModel: string): Map<string, SchemaLoadData> {\n if (!this._iModelItems.has(iModel)) {\n this._iModelItems.set(iModel, new Map());\n }\n\n return this._iModelItems.get(iModel) as Map<string, SchemaLoadData>;\n }\n\n private getSchemaLoadData(schemaMap: Map<string, SchemaLoadData>, schemaName: string): SchemaLoadData {\n if (!schemaMap.has(schemaName))\n schemaMap.set(schemaName, { schemaItemMap: new Map() })\n\n return schemaMap.get(schemaName) as SchemaLoadData;\n }\n}"]}