@undefineds.co/xpod 0.3.29 → 0.3.31
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.
- package/dist/authorization/PodAuthorizationResources.d.ts +1 -0
- package/dist/authorization/PodAuthorizationResources.js +36 -4
- package/dist/authorization/PodAuthorizationResources.js.map +1 -1
- package/dist/provision/LocalPodProvisioningService.js +2 -0
- package/dist/provision/LocalPodProvisioningService.js.map +1 -1
- package/dist/provision/ProvisionPodCreator.js +16 -0
- package/dist/provision/ProvisionPodCreator.js.map +1 -1
- package/dist/storage/accessors/MixDataAccessor.js.map +1 -1
- package/dist/storage/rdf/PostgresRdfEngine.d.ts +12 -15
- package/dist/storage/rdf/PostgresRdfEngine.js +1040 -150
- package/dist/storage/rdf/PostgresRdfEngine.js.map +1 -1
- package/dist/storage/rdf/PostgresRdfEngine.jsonld +40 -52
- package/dist/storage/rdf/{RdfLocalQueryEngine.d.ts → RdfQueryExecutor.d.ts} +3 -3
- package/dist/storage/rdf/{RdfLocalQueryEngine.js → RdfQueryExecutor.js} +9 -9
- package/dist/storage/rdf/RdfQueryExecutor.js.map +1 -0
- package/dist/storage/rdf/RdfSparqlAdapter.d.ts +5 -5
- package/dist/storage/rdf/RdfSparqlAdapter.js +27 -27
- package/dist/storage/rdf/RdfSparqlAdapter.js.map +1 -1
- package/dist/storage/rdf/SolidRdfEngine.d.ts +2 -5
- package/dist/storage/rdf/SolidRdfEngine.js +6 -38
- package/dist/storage/rdf/SolidRdfEngine.js.map +1 -1
- package/dist/storage/rdf/SolidRdfEngine.jsonld +0 -12
- package/dist/storage/rdf/SolidRdfSparqlEngine.js.map +1 -1
- package/dist/storage/rdf/index.d.ts +3 -3
- package/dist/storage/rdf/index.js +6 -6
- package/dist/storage/rdf/index.js.map +1 -1
- package/dist/storage/rdf/models-benchmark.d.ts +9 -9
- package/dist/storage/rdf/models-benchmark.js +23 -23
- package/dist/storage/rdf/models-benchmark.js.map +1 -1
- package/dist/storage/rdf/types.d.ts +5 -5
- package/dist/storage/rdf/types.js.map +1 -1
- package/package.json +1 -1
- package/templates/pod/acp/profile/.acr +21 -0
- package/templates/pod/wac/profile/.acl.hbs +18 -0
- package/dist/storage/rdf/RdfLocalQueryEngine.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RDF_MODELS_SYNTHETIC_MESSAGE_QUADS = exports.runRdfModelsShadowBenchmark = exports.runRdfModelsRdf3xShadowBenchmark = exports.runRdfModelsBenchmark = exports.rdfModelsBenchmarkScaleTargetQuads = exports.rdfModelsBenchmarkSyntheticPodCount = exports.rdfModelsBenchmarkScaleSatisfied = exports.estimateRdfModelsSyntheticQuadCount = exports.defaultSyntheticMessagesForRdfModelsScale = exports.
|
|
3
|
+
exports.RDF_MODELS_SYNTHETIC_MESSAGE_QUADS = exports.runRdfModelsShadowBenchmark = exports.runRdfModelsRdf3xShadowBenchmark = exports.runRdfModelsBenchmark = exports.rdfModelsBenchmarkScaleTargetQuads = exports.rdfModelsBenchmarkSyntheticPodCount = exports.rdfModelsBenchmarkScaleSatisfied = exports.estimateRdfModelsSyntheticQuadCount = exports.defaultSyntheticMessagesForRdfModelsScale = exports.rdfModelsQueryBenchmarkCaseNames = exports.rdfModelsQueryBenchmarkCases = exports.rdfModelsBenchmarkCaseNames = exports.rdfModelsBenchmarkCases = exports.SolidRdfSparqlEngine = exports.UnsupportedSparqlQueryError = exports.RdfSparqlAdapter = exports.DisabledSparqlFeatureError = exports.PostgresRdfEngine = exports.SolidRdfEngine = exports.ShadowRdfQuintStore = exports.rdfVar = exports.RdfQueryExecutor = exports.diffQuads = exports.canonicalQuadKey = exports.RdfShadowComparator = exports.rdfContentTypeForPath = exports.normalizeContentType = exports.isSafeRdfDocumentContentType = exports.isRdfDocumentPath = exports.isRdfDocumentContentType = exports.isRdfDocument = exports.isLineAddressableRdfPath = exports.isLineAddressableRdfContentType = exports.isLineAddressableRdf = exports.RdfVectorIndex = exports.RdfTextIndex = exports.Rdf3xIndex = exports.RdfQuadIndex = exports.rdfNumericValue = exports.isRdfNumericTerm = exports.isRdfNumericDatatype = exports.isFiniteNumericLexical = exports.RDF_NUMERIC_DATATYPES = exports.RdfTermDictionary = void 0;
|
|
4
4
|
var RdfTermDictionary_1 = require("./RdfTermDictionary");
|
|
5
5
|
Object.defineProperty(exports, "RdfTermDictionary", { enumerable: true, get: function () { return RdfTermDictionary_1.RdfTermDictionary; } });
|
|
6
6
|
var RdfTermSemantics_1 = require("./RdfTermSemantics");
|
|
@@ -31,9 +31,9 @@ var RdfShadowComparator_1 = require("./RdfShadowComparator");
|
|
|
31
31
|
Object.defineProperty(exports, "RdfShadowComparator", { enumerable: true, get: function () { return RdfShadowComparator_1.RdfShadowComparator; } });
|
|
32
32
|
Object.defineProperty(exports, "canonicalQuadKey", { enumerable: true, get: function () { return RdfShadowComparator_1.canonicalQuadKey; } });
|
|
33
33
|
Object.defineProperty(exports, "diffQuads", { enumerable: true, get: function () { return RdfShadowComparator_1.diffQuads; } });
|
|
34
|
-
var
|
|
35
|
-
Object.defineProperty(exports, "
|
|
36
|
-
Object.defineProperty(exports, "rdfVar", { enumerable: true, get: function () { return
|
|
34
|
+
var RdfQueryExecutor_1 = require("./RdfQueryExecutor");
|
|
35
|
+
Object.defineProperty(exports, "RdfQueryExecutor", { enumerable: true, get: function () { return RdfQueryExecutor_1.RdfQueryExecutor; } });
|
|
36
|
+
Object.defineProperty(exports, "rdfVar", { enumerable: true, get: function () { return RdfQueryExecutor_1.variable; } });
|
|
37
37
|
var ShadowRdfQuintStore_1 = require("./ShadowRdfQuintStore");
|
|
38
38
|
Object.defineProperty(exports, "ShadowRdfQuintStore", { enumerable: true, get: function () { return ShadowRdfQuintStore_1.ShadowRdfQuintStore; } });
|
|
39
39
|
var SolidRdfEngine_1 = require("./SolidRdfEngine");
|
|
@@ -49,8 +49,8 @@ Object.defineProperty(exports, "SolidRdfSparqlEngine", { enumerable: true, get:
|
|
|
49
49
|
var models_benchmark_1 = require("./models-benchmark");
|
|
50
50
|
Object.defineProperty(exports, "rdfModelsBenchmarkCases", { enumerable: true, get: function () { return models_benchmark_1.rdfModelsBenchmarkCases; } });
|
|
51
51
|
Object.defineProperty(exports, "rdfModelsBenchmarkCaseNames", { enumerable: true, get: function () { return models_benchmark_1.rdfModelsBenchmarkCaseNames; } });
|
|
52
|
-
Object.defineProperty(exports, "
|
|
53
|
-
Object.defineProperty(exports, "
|
|
52
|
+
Object.defineProperty(exports, "rdfModelsQueryBenchmarkCases", { enumerable: true, get: function () { return models_benchmark_1.rdfModelsQueryBenchmarkCases; } });
|
|
53
|
+
Object.defineProperty(exports, "rdfModelsQueryBenchmarkCaseNames", { enumerable: true, get: function () { return models_benchmark_1.rdfModelsQueryBenchmarkCaseNames; } });
|
|
54
54
|
Object.defineProperty(exports, "defaultSyntheticMessagesForRdfModelsScale", { enumerable: true, get: function () { return models_benchmark_1.defaultSyntheticMessagesForRdfModelsScale; } });
|
|
55
55
|
Object.defineProperty(exports, "estimateRdfModelsSyntheticQuadCount", { enumerable: true, get: function () { return models_benchmark_1.estimateRdfModelsSyntheticQuadCount; } });
|
|
56
56
|
Object.defineProperty(exports, "rdfModelsBenchmarkScaleSatisfied", { enumerable: true, get: function () { return models_benchmark_1.rdfModelsBenchmarkScaleSatisfied; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/storage/rdf/index.ts"],"names":[],"mappings":";;;AAAA,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,uDAM4B;AAL1B,yHAAA,qBAAqB,OAAA;AACrB,0HAAA,sBAAsB,OAAA;AACtB,wHAAA,oBAAoB,OAAA;AACpB,oHAAA,gBAAgB,OAAA;AAChB,mHAAA,eAAe,OAAA;AAEjB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,qDAU2B;AATzB,uHAAA,oBAAoB,OAAA;AACpB,kIAAA,+BAA+B,OAAA;AAC/B,2HAAA,wBAAwB,OAAA;AACxB,gHAAA,aAAa,OAAA;AACb,2HAAA,wBAAwB,OAAA;AACxB,oHAAA,iBAAiB,OAAA;AACjB,+HAAA,4BAA4B,OAAA;AAC5B,uHAAA,oBAAoB,OAAA;AACpB,wHAAA,qBAAqB,OAAA;AAEvB,6DAAyF;AAAhF,0HAAA,mBAAmB,OAAA;AAAE,uHAAA,gBAAgB,OAAA;AAAE,gHAAA,SAAS,OAAA;AACzD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/storage/rdf/index.ts"],"names":[],"mappings":";;;AAAA,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,uDAM4B;AAL1B,yHAAA,qBAAqB,OAAA;AACrB,0HAAA,sBAAsB,OAAA;AACtB,wHAAA,oBAAoB,OAAA;AACpB,oHAAA,gBAAgB,OAAA;AAChB,mHAAA,eAAe,OAAA;AAEjB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,qDAU2B;AATzB,uHAAA,oBAAoB,OAAA;AACpB,kIAAA,+BAA+B,OAAA;AAC/B,2HAAA,wBAAwB,OAAA;AACxB,gHAAA,aAAa,OAAA;AACb,2HAAA,wBAAwB,OAAA;AACxB,oHAAA,iBAAiB,OAAA;AACjB,+HAAA,4BAA4B,OAAA;AAC5B,uHAAA,oBAAoB,OAAA;AACpB,wHAAA,qBAAqB,OAAA;AAEvB,6DAAyF;AAAhF,0HAAA,mBAAmB,OAAA;AAAE,uHAAA,gBAAgB,OAAA;AAAE,gHAAA,SAAS,OAAA;AACzD,uDAA0E;AAAjE,oHAAA,gBAAgB,OAAA;AAAE,0GAAA,QAAQ,OAAU;AAC7C,6DAA6F;AAApF,0HAAA,mBAAmB,OAAA;AAC5B,mDAA8E;AAArE,gHAAA,cAAc,OAAA;AACvB,yDAAuF;AAA9E,sHAAA,iBAAiB,OAAA;AAC1B,uDAW4B;AAV1B,8HAAA,0BAA0B,OAAA;AAC1B,oHAAA,gBAAgB,OAAA;AAChB,+HAAA,2BAA2B,OAAA;AAS7B,+DASgC;AAR9B,4HAAA,oBAAoB,OAAA;AAStB,uDA4B4B;AA3B1B,2HAAA,uBAAuB,OAAA;AACvB,+HAAA,2BAA2B,OAAA;AAC3B,gIAAA,4BAA4B,OAAA;AAC5B,oIAAA,gCAAgC,OAAA;AAChC,6IAAA,yCAAyC,OAAA;AACzC,uIAAA,mCAAmC,OAAA;AACnC,oIAAA,gCAAgC,OAAA;AAChC,uIAAA,mCAAmC,OAAA;AACnC,sIAAA,kCAAkC,OAAA;AAClC,yHAAA,qBAAqB,OAAA;AACrB,oIAAA,gCAAgC,OAAA;AAChC,+HAAA,2BAA2B,OAAA;AAC3B,sIAAA,kCAAkC,OAAA","sourcesContent":["export { RdfTermDictionary } from './RdfTermDictionary';\nexport {\n RDF_NUMERIC_DATATYPES,\n isFiniteNumericLexical,\n isRdfNumericDatatype,\n isRdfNumericTerm,\n rdfNumericValue,\n} from './RdfTermSemantics';\nexport { RdfQuadIndex } from './RdfQuadIndex';\nexport { Rdf3xIndex } from './Rdf3xIndex';\nexport { RdfTextIndex } from './RdfTextIndex';\nexport { RdfVectorIndex } from './RdfVectorIndex';\nexport {\n isLineAddressableRdf,\n isLineAddressableRdfContentType,\n isLineAddressableRdfPath,\n isRdfDocument,\n isRdfDocumentContentType,\n isRdfDocumentPath,\n isSafeRdfDocumentContentType,\n normalizeContentType,\n rdfContentTypeForPath,\n} from './RdfContentTypes';\nexport { RdfShadowComparator, canonicalQuadKey, diffQuads } from './RdfShadowComparator';\nexport { RdfQueryExecutor, variable as rdfVar } from './RdfQueryExecutor';\nexport { ShadowRdfQuintStore, type ShadowRdfQuintStoreOptions } from './ShadowRdfQuintStore';\nexport { SolidRdfEngine, type SolidRdfEngineOptions } from './SolidRdfEngine';\nexport { PostgresRdfEngine, type PostgresRdfEngineOptions } from './PostgresRdfEngine';\nexport {\n DisabledSparqlFeatureError,\n RdfSparqlAdapter,\n UnsupportedSparqlQueryError,\n type RdfSparqlCompileResult,\n type RdfSparqlDeleteOperation,\n type RdfSparqlDeleteWhereOperation,\n type RdfSparqlDeleteWhereTemplate,\n type RdfSparqlInsertOperation,\n type RdfSparqlUpdateDelta,\n type RdfSparqlUpdateDeltaOperation,\n} from './RdfSparqlAdapter';\nexport {\n SolidRdfSparqlEngine,\n type SolidRdfSparqlEngineOptions,\n type SolidRdfSparqlFallback,\n type SolidRdfSparqlFallbackMetric,\n type SolidRdfSparqlMetricsSnapshot,\n type SolidRdfSparqlOperation,\n type SolidRdfSparqlOperationCount,\n type SolidRdfSparqlPrimaryMetric,\n} from './SolidRdfSparqlEngine';\nexport {\n rdfModelsBenchmarkCases,\n rdfModelsBenchmarkCaseNames,\n rdfModelsQueryBenchmarkCases,\n rdfModelsQueryBenchmarkCaseNames,\n defaultSyntheticMessagesForRdfModelsScale,\n estimateRdfModelsSyntheticQuadCount,\n rdfModelsBenchmarkScaleSatisfied,\n rdfModelsBenchmarkSyntheticPodCount,\n rdfModelsBenchmarkScaleTargetQuads,\n runRdfModelsBenchmark,\n runRdfModelsRdf3xShadowBenchmark,\n runRdfModelsShadowBenchmark,\n RDF_MODELS_SYNTHETIC_MESSAGE_QUADS,\n type RdfBenchmarkScale,\n type RdfModelBenchmarkCase,\n type RdfModelQueryBenchmarkCase,\n type RdfModelQueryBenchmarkResult,\n type RdfModelBenchmarkReport,\n type RdfModelBenchmarkResult,\n type RdfModelBenchmarkRunOptions,\n type RdfModelShadowBenchmarkReport,\n type RdfModelRdf3xShadowBenchmarkReport,\n type RdfModelRdf3xShadowJoinBenchmarkResult,\n type RdfModelRdf3xShadowBenchmarkResult,\n type RdfModelShadowBenchmarkResult,\n type RdfModelShadowBenchmarkRunOptions,\n type RdfModelShadowBenchmarkSide,\n} from './models-benchmark';\nexport type {\n RdfEngineLike,\n RdfEngineStorageStats,\n RdfDerivedIndexRefreshResult,\n RdfIndexStats,\n RdfDerivedIndexProfile,\n Rdf3xCardinalityEstimate,\n Rdf3xCountResult,\n Rdf3xJoinMetrics,\n Rdf3xJoinOptions,\n Rdf3xJoinScanResult,\n Rdf3xIndexMetrics,\n Rdf3xIndexStats,\n Rdf3xObjectOperatorPattern,\n Rdf3xObjectRangePattern,\n Rdf3xPairProjectionName,\n Rdf3xPatternKey,\n Rdf3xPermutationName,\n Rdf3xRebuildResult,\n Rdf3xTermKey,\n Rdf3xTermInPattern,\n Rdf3xTermMetadataPattern,\n Rdf3xTermNotInPattern,\n Rdf3xTermProjectionName,\n Rdf3xTermTypePatternValue,\n Rdf3xIndexOptions,\n Rdf3xTriplePattern,\n Rdf3xTripleScanOptions,\n Rdf3xTripleScanResult,\n Rdf3xShadowBindingDiff,\n Rdf3xShadowQuadDiff,\n Rdf3xShadowJoinResult,\n Rdf3xShadowScanResult,\n RdfIndexSpaceObject,\n RdfIndexMetrics,\n RdfIndexPutOptions,\n RdfBindingRow,\n RdfConstructTemplate,\n RdfQuadJoinOptions,\n RdfQuadJoinCountOptions,\n RdfQuadJoinOrder,\n RdfQuadJoinPattern,\n RdfQuadJoinScanResult,\n RdfQuery,\n RdfQueryAggregate,\n RdfQueryMetrics,\n RdfQueryResult,\n RdfPatternQuery,\n RdfQuadIndexOptions,\n RdfQuadIndexScanResult,\n RdfQuadRow,\n RdfQueryOrder,\n RdfQueryPattern,\n RdfQueryPatternKey,\n RdfQueryTermPattern,\n RdfQueryVariable,\n RdfShadowBackfillOptions,\n RdfShadowBackfillResult,\n RdfShadowDiff,\n RdfShadowScanResult,\n RdfSourceInput,\n RdfSourceRow,\n RdfTextChunkInput,\n RdfTextChunkRow,\n RdfTextIndexOptions,\n RdfTextIndexStats,\n RdfTextSearchOptions,\n RdfTextSearchPattern,\n RdfTextSearchResult,\n RdfTextSourceInput,\n RdfTextTermDocumentFrequency,\n RdfVectorChunkInput,\n RdfVectorChunkRow,\n RdfVectorDistanceMetric,\n RdfVectorIndexOptions,\n RdfVectorIndexStats,\n RdfVectorModelDistribution,\n RdfVectorSearchOptions,\n RdfVectorSearchPattern,\n RdfVectorSearchResult,\n RdfVectorSourceInput,\n RdfTermKind,\n RdfTermLookup,\n RdfTermRow,\n RdfTermSelection,\n} from './types';\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { QuintPattern, QueryOptions, QuintStore, StoreStats } from '../quint/types';
|
|
2
|
-
import type { Rdf3xJoinMetrics, Rdf3xIndexMetrics, Rdf3xIndexStats, RdfEngineStorageStats, RdfIndexMetrics, RdfIndexStats,
|
|
2
|
+
import type { Rdf3xJoinMetrics, Rdf3xIndexMetrics, Rdf3xIndexStats, RdfEngineStorageStats, RdfIndexMetrics, RdfIndexStats, RdfQuery, RdfQueryMetrics, RdfShadowDiff } from './types';
|
|
3
3
|
import type { SolidRdfEngine } from './SolidRdfEngine';
|
|
4
4
|
export type RdfBenchmarkScale = 'small' | 'medium' | 'large';
|
|
5
5
|
export declare const RDF_MODELS_SYNTHETIC_MESSAGE_QUADS = 4;
|
|
@@ -14,18 +14,18 @@ export interface RdfModelBenchmarkCase {
|
|
|
14
14
|
};
|
|
15
15
|
expectedPlan: string[];
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface RdfModelQueryBenchmarkCase {
|
|
18
18
|
name: string;
|
|
19
19
|
resource: string;
|
|
20
20
|
purpose: string;
|
|
21
21
|
minScale: RdfBenchmarkScale;
|
|
22
22
|
minReturnedRows?: number;
|
|
23
|
-
query:
|
|
23
|
+
query: RdfQuery;
|
|
24
24
|
expectedPlan: string[];
|
|
25
25
|
}
|
|
26
26
|
export interface RdfModelBenchmarkRunOptions {
|
|
27
27
|
cases?: readonly RdfModelBenchmarkCase[];
|
|
28
|
-
|
|
28
|
+
queryCases?: readonly RdfModelQueryBenchmarkCase[];
|
|
29
29
|
scale?: RdfBenchmarkScale;
|
|
30
30
|
iterations?: number;
|
|
31
31
|
}
|
|
@@ -55,7 +55,7 @@ export interface RdfModelBenchmarkResult {
|
|
|
55
55
|
metrics: RdfIndexMetrics;
|
|
56
56
|
indexStats: RdfIndexStats;
|
|
57
57
|
}
|
|
58
|
-
export interface
|
|
58
|
+
export interface RdfModelQueryBenchmarkResult {
|
|
59
59
|
name: string;
|
|
60
60
|
resource: string;
|
|
61
61
|
purpose: string;
|
|
@@ -74,7 +74,7 @@ export interface RdfModelLocalQueryBenchmarkResult {
|
|
|
74
74
|
durationsMs: number[];
|
|
75
75
|
p50DurationMs: number;
|
|
76
76
|
p95DurationMs: number;
|
|
77
|
-
metrics:
|
|
77
|
+
metrics: RdfQueryMetrics;
|
|
78
78
|
indexStats: RdfIndexStats;
|
|
79
79
|
}
|
|
80
80
|
export interface RdfModelBenchmarkReport {
|
|
@@ -86,7 +86,7 @@ export interface RdfModelBenchmarkReport {
|
|
|
86
86
|
failedPlanCases: string[];
|
|
87
87
|
storage: RdfEngineStorageStats;
|
|
88
88
|
cases: RdfModelBenchmarkResult[];
|
|
89
|
-
|
|
89
|
+
queryCases: RdfModelQueryBenchmarkResult[];
|
|
90
90
|
}
|
|
91
91
|
export interface RdfModelShadowBenchmarkRunOptions extends RdfModelBenchmarkRunOptions {
|
|
92
92
|
}
|
|
@@ -257,9 +257,9 @@ export interface RdfModelRdf3xShadowBenchmarkReport {
|
|
|
257
257
|
}
|
|
258
258
|
type JsonPattern = Record<string, unknown>;
|
|
259
259
|
export declare const rdfModelsBenchmarkCases: readonly RdfModelBenchmarkCase[];
|
|
260
|
-
export declare const
|
|
260
|
+
export declare const rdfModelsQueryBenchmarkCases: readonly RdfModelQueryBenchmarkCase[];
|
|
261
261
|
export declare function rdfModelsBenchmarkCaseNames(): string[];
|
|
262
|
-
export declare function
|
|
262
|
+
export declare function rdfModelsQueryBenchmarkCaseNames(): string[];
|
|
263
263
|
export declare function rdfModelsBenchmarkScaleTargetQuads(scale: RdfBenchmarkScale): number;
|
|
264
264
|
export declare function rdfModelsBenchmarkSyntheticPodCount(scale: RdfBenchmarkScale): number;
|
|
265
265
|
export declare function estimateRdfModelsSyntheticQuadCount(syntheticMessages: number): number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.rdfModelsQueryBenchmarkCases = exports.rdfModelsBenchmarkCases = exports.RDF_MODELS_SYNTHETIC_MESSAGE_QUADS = void 0;
|
|
4
4
|
exports.rdfModelsBenchmarkCaseNames = rdfModelsBenchmarkCaseNames;
|
|
5
|
-
exports.
|
|
5
|
+
exports.rdfModelsQueryBenchmarkCaseNames = rdfModelsQueryBenchmarkCaseNames;
|
|
6
6
|
exports.rdfModelsBenchmarkScaleTargetQuads = rdfModelsBenchmarkScaleTargetQuads;
|
|
7
7
|
exports.rdfModelsBenchmarkSyntheticPodCount = rdfModelsBenchmarkSyntheticPodCount;
|
|
8
8
|
exports.estimateRdfModelsSyntheticQuadCount = estimateRdfModelsSyntheticQuadCount;
|
|
@@ -362,9 +362,9 @@ exports.rdfModelsBenchmarkCases = [
|
|
|
362
362
|
expectedPlan: ['graph-scope', 'type-filter', 'limit'],
|
|
363
363
|
},
|
|
364
364
|
];
|
|
365
|
-
exports.
|
|
365
|
+
exports.rdfModelsQueryBenchmarkCases = [
|
|
366
366
|
{
|
|
367
|
-
name: 'latest message by thread
|
|
367
|
+
name: 'latest message by thread query',
|
|
368
368
|
resource: 'message',
|
|
369
369
|
purpose: 'date-bucketed message timeline keeps ORDER BY/LIMIT inside SQL self-join',
|
|
370
370
|
minScale: 'small',
|
|
@@ -395,7 +395,7 @@ exports.rdfModelsLocalQueryBenchmarkCases = [
|
|
|
395
395
|
expectedPlan: ['join-index', 'join-order-pushdown', 'join-limit-pushdown'],
|
|
396
396
|
},
|
|
397
397
|
{
|
|
398
|
-
name: 'next queued run by workspace
|
|
398
|
+
name: 'next queued run by workspace query',
|
|
399
399
|
resource: 'run',
|
|
400
400
|
purpose: 'run state center scheduler query keeps status/workspace/date joins in SQL before LIMIT',
|
|
401
401
|
minScale: 'small',
|
|
@@ -432,7 +432,7 @@ exports.rdfModelsLocalQueryBenchmarkCases = [
|
|
|
432
432
|
expectedPlan: ['join-index', 'join-order-pushdown', 'join-limit-pushdown'],
|
|
433
433
|
},
|
|
434
434
|
{
|
|
435
|
-
name: 'run steps by run
|
|
435
|
+
name: 'run steps by run query',
|
|
436
436
|
resource: 'runStep',
|
|
437
437
|
purpose: 'one-to-many run-step lookup keeps type and run relation in SQL self-join',
|
|
438
438
|
minScale: 'small',
|
|
@@ -463,7 +463,7 @@ exports.rdfModelsLocalQueryBenchmarkCases = [
|
|
|
463
463
|
expectedPlan: ['join-index', 'join-order-pushdown', 'join-limit-pushdown'],
|
|
464
464
|
},
|
|
465
465
|
{
|
|
466
|
-
name: 'task materialization active due
|
|
466
|
+
name: 'task materialization active due query',
|
|
467
467
|
resource: 'schedule',
|
|
468
468
|
purpose: 'task scheduler materialization keeps active status and due-time filter in SQL self-join',
|
|
469
469
|
minScale: 'small',
|
|
@@ -648,8 +648,8 @@ exports.rdfModelsLocalQueryBenchmarkCases = [
|
|
|
648
648
|
function rdfModelsBenchmarkCaseNames() {
|
|
649
649
|
return exports.rdfModelsBenchmarkCases.map((testCase) => testCase.name);
|
|
650
650
|
}
|
|
651
|
-
function
|
|
652
|
-
return exports.
|
|
651
|
+
function rdfModelsQueryBenchmarkCaseNames() {
|
|
652
|
+
return exports.rdfModelsQueryBenchmarkCases.map((testCase) => testCase.name);
|
|
653
653
|
}
|
|
654
654
|
function rdfModelsBenchmarkScaleTargetQuads(scale) {
|
|
655
655
|
return RDF_MODELS_SCALE_TARGET_QUADS[scale];
|
|
@@ -674,13 +674,13 @@ function runRdfModelsBenchmark(engine, options = {}) {
|
|
|
674
674
|
const iterations = Math.max(1, Math.floor(options.iterations ?? 1));
|
|
675
675
|
const cases = (options.cases ?? exports.rdfModelsBenchmarkCases)
|
|
676
676
|
.filter((testCase) => scaleRank(testCase.minScale) <= scaleRank(scale));
|
|
677
|
-
const
|
|
677
|
+
const queryCases = (options.queryCases ?? exports.rdfModelsQueryBenchmarkCases)
|
|
678
678
|
.filter((testCase) => scaleRank(testCase.minScale) <= scaleRank(scale));
|
|
679
679
|
const results = cases.map((testCase) => runBenchmarkCase(engine, testCase, iterations));
|
|
680
|
-
const
|
|
680
|
+
const queryResults = queryCases.map((testCase) => runQueryBenchmarkCase(engine, testCase, iterations));
|
|
681
681
|
const failedPlanCases = [
|
|
682
682
|
...results.filter((result) => !result.planMatched).map((result) => result.name),
|
|
683
|
-
...
|
|
683
|
+
...queryResults.filter((result) => !result.planMatched).map((result) => result.name),
|
|
684
684
|
];
|
|
685
685
|
return {
|
|
686
686
|
engine: 'solid-rdf',
|
|
@@ -691,7 +691,7 @@ function runRdfModelsBenchmark(engine, options = {}) {
|
|
|
691
691
|
failedPlanCases,
|
|
692
692
|
storage: engine.storageStats(),
|
|
693
693
|
cases: results,
|
|
694
|
-
|
|
694
|
+
queryCases: queryResults,
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
697
|
async function runRdfModelsShadowBenchmark(engine, compatibilityStore, options = {}) {
|
|
@@ -736,11 +736,11 @@ function runRdfModelsRdf3xShadowBenchmark(engine, options = {}) {
|
|
|
736
736
|
const iterations = Math.max(1, Math.floor(options.iterations ?? 1));
|
|
737
737
|
const cases = (options.cases ?? exports.rdfModelsBenchmarkCases)
|
|
738
738
|
.filter((testCase) => scaleRank(testCase.minScale) <= scaleRank(scale));
|
|
739
|
-
const
|
|
739
|
+
const queryCases = (options.queryCases ?? exports.rdfModelsQueryBenchmarkCases)
|
|
740
740
|
.filter((testCase) => scaleRank(testCase.minScale) <= scaleRank(scale));
|
|
741
741
|
const rebuild = engine.rdf3xIndex.rebuildFromCurrentQuads();
|
|
742
742
|
const results = cases.map((testCase) => runRdf3xShadowBenchmarkCase(engine, testCase, iterations));
|
|
743
|
-
const joinResults =
|
|
743
|
+
const joinResults = queryCases.map((testCase) => runRdf3xShadowJoinBenchmarkCase(engine, testCase, iterations));
|
|
744
744
|
const supportedResults = results.filter((result) => result.supported);
|
|
745
745
|
const supportedJoinResults = joinResults.filter((result) => result.supported);
|
|
746
746
|
const failedPlanCases = [
|
|
@@ -815,7 +815,7 @@ function runBenchmarkCase(engine, testCase, iterations) {
|
|
|
815
815
|
indexStats: engine.index.stats(),
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function runQueryBenchmarkCase(engine, testCase, iterations) {
|
|
819
819
|
const durationsMs = [];
|
|
820
820
|
let metrics;
|
|
821
821
|
let keys = [];
|
|
@@ -837,13 +837,13 @@ function runLocalQueryBenchmarkCase(engine, testCase, iterations) {
|
|
|
837
837
|
filtersApplied: 0,
|
|
838
838
|
filtersPushedDown: 0,
|
|
839
839
|
};
|
|
840
|
-
const missingPlan =
|
|
840
|
+
const missingPlan = missingExpectedQueryPlan(testCase, finalMetrics, keys.length);
|
|
841
841
|
return {
|
|
842
842
|
name: testCase.name,
|
|
843
843
|
resource: testCase.resource,
|
|
844
844
|
purpose: testCase.purpose,
|
|
845
845
|
minScale: testCase.minScale,
|
|
846
|
-
query:
|
|
846
|
+
query: serializeQueryPlan(testCase.query),
|
|
847
847
|
expectedPlan: [...testCase.expectedPlan],
|
|
848
848
|
planMatched: missingPlan.length === 0,
|
|
849
849
|
missingPlan,
|
|
@@ -1187,7 +1187,7 @@ function baseRdf3xShadowJoinBenchmarkResult(testCase) {
|
|
|
1187
1187
|
resource: testCase.resource,
|
|
1188
1188
|
purpose: testCase.purpose,
|
|
1189
1189
|
minScale: testCase.minScale,
|
|
1190
|
-
query:
|
|
1190
|
+
query: serializeQueryPlan(testCase.query),
|
|
1191
1191
|
expectedPlan: [...testCase.expectedPlan],
|
|
1192
1192
|
};
|
|
1193
1193
|
}
|
|
@@ -1768,9 +1768,9 @@ function matchesRdf3xPermutation(metrics, permutation) {
|
|
|
1768
1768
|
const planText = (metrics.queryPlan ?? []).join('\n');
|
|
1769
1769
|
return metrics.indexChoice === permutation || planText.includes(`Rdf3xPermutationScan(${permutation})`);
|
|
1770
1770
|
}
|
|
1771
|
-
function
|
|
1771
|
+
function missingExpectedQueryPlan(testCase, metrics, returnedRows) {
|
|
1772
1772
|
return [
|
|
1773
|
-
...testCase.expectedPlan.filter((label) => !
|
|
1773
|
+
...testCase.expectedPlan.filter((label) => !matchesExpectedQueryPlanLabel(label, metrics)),
|
|
1774
1774
|
...unresolvedPlanFailures(metrics.plan),
|
|
1775
1775
|
...minimumReturnedRowsFailures(testCase, returnedRows),
|
|
1776
1776
|
];
|
|
@@ -1785,7 +1785,7 @@ function minimumReturnedRowsFailures(testCase, returnedRows) {
|
|
|
1785
1785
|
const minimum = testCase.minReturnedRows ?? 0;
|
|
1786
1786
|
return returnedRows >= minimum ? [] : [`min-rows:${minimum}`];
|
|
1787
1787
|
}
|
|
1788
|
-
function
|
|
1788
|
+
function matchesExpectedQueryPlanLabel(label, metrics) {
|
|
1789
1789
|
const planText = metrics.plan.join('\n');
|
|
1790
1790
|
switch (label) {
|
|
1791
1791
|
case 'group-count-index':
|
|
@@ -1900,7 +1900,7 @@ function scaleRank(scale) {
|
|
|
1900
1900
|
function serializePattern(pattern) {
|
|
1901
1901
|
return Object.fromEntries(Object.entries(pattern).map(([key, value]) => [key, serializePatternValue(value)]));
|
|
1902
1902
|
}
|
|
1903
|
-
function
|
|
1903
|
+
function serializeQueryPlan(query) {
|
|
1904
1904
|
return serializePatternValue(query);
|
|
1905
1905
|
}
|
|
1906
1906
|
function serializePatternValue(value) {
|