{
+ queries={sortBy(result?.extensions.queries, (q) => {
return -(q.endTime - q.startTime);
})}
/>
@@ -281,11 +280,7 @@ const AccordionOperation = ({
);
};
-const Queries = ({
- queries,
-}: {
- queries: { startTime: number; endTime: number; text: string }[];
-}) => {
+const Queries = ({ queries }: { queries: RequestQueryMeta[] }) => {
return (
{queries.map((q, i) => {
diff --git a/app/graphql/context.tsx b/app/graphql/context.tsx
index c5116a113..95003b860 100644
--- a/app/graphql/context.tsx
+++ b/app/graphql/context.tsx
@@ -112,11 +112,31 @@ const setupSparqlClients = (
saveTimingToContext
);
+ sparqlClient.query.construct = timed(
+ sparqlClient.query.construct,
+ saveTimingToContext
+ );
+
+ sparqlClientStream.query.select = timed(
+ sparqlClientStream.query.select,
+ saveTimingToContext
+ );
+
+ sparqlClientStream.query.construct = timed(
+ sparqlClientStream.query.construct,
+ saveTimingToContext
+ );
+
geoSparqlClient.query.select = timed(
geoSparqlClient.query.select,
saveTimingToContext
);
+ geoSparqlClient.query.construct = timed(
+ geoSparqlClient.query.construct,
+ saveTimingToContext
+ );
+
return { sparqlClient, sparqlClientStream, geoSparqlClient };
};
diff --git a/app/rdf/query-hierarchies.ts b/app/rdf/query-hierarchies.ts
index c075081cb..b73af0dfb 100644
--- a/app/rdf/query-hierarchies.ts
+++ b/app/rdf/query-hierarchies.ts
@@ -19,9 +19,9 @@ import { ResolvedDimension } from "@/graphql/shared-types";
import * as ns from "./namespace";
import { getCubeDimensionValuesWithMetadata } from "./queries";
import {
- pruneTree,
- mapTree,
getOptionsFromTree,
+ mapTree,
+ pruneTree,
regroupTrees,
} from "./tree-utils";
@@ -118,6 +118,7 @@ export const queryHierarchy = async (
if (hierarchies.length === 0) {
return null;
}
+
const dimensionValuesWithLabels = await getCubeDimensionValuesWithMetadata({
cube: rdimension.cube,
dimension: rdimension.dimension,