Skip to content

Commit

Permalink
Remove unused bench
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <[email protected]>
  • Loading branch information
mcandeia committed Oct 15, 2024
1 parent d61181b commit 41dc277
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions engine/schema/schemeable.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,9 @@
import { dirname, join } from "@std/path";

import { fromFileUrl, toFileUrl } from "@std/path";
import {
findSchemeableFromNode,
type Schemeable as _Schemeable,
} from "https://denopkg.com/deco-cx/[email protected]/engine/schema/transform.ts";
import { denoDoc } from "https://denopkg.com/deco-cx/[email protected]/engine/schema/utils.ts";
import { ImportMapBuilder } from "../importmap/builder.ts";
import { parsePath } from "./parser.ts";
import { typeNameToSchemeable, type Schemeable } from "./transform.ts";
import { type Schemeable, typeNameToSchemeable } from "./transform.ts";

const folder = dirname(fromFileUrl(import.meta.url));
const file = "schemeable.test.types.ts";
Expand Down Expand Up @@ -79,18 +74,6 @@ const getSchemeableDenoAST = async (
});
};

const _getSchemeableDenoDoc = async (
path: string,
name: string,
): Promise<_Schemeable | undefined> => {
const ast = await denoDoc(path);
const nodeTypeRef = ast.find((node) => node.name === name);
if (!nodeTypeRef) {
return undefined;
}
return await findSchemeableFromNode(nodeTypeRef, [path, ast], new Map());
};

Deno.bench(
"transform to schemeable using deno_ast",
{ group: "schema_gen", baseline: true },
Expand All @@ -102,15 +85,3 @@ Deno.bench(
}));
},
);

// Deno 2.0.0 has breaking changes in the deno_doc API
// Deno.bench(
// "transform to schemeable using denodoc",
// { group: "schema_gen" },
// async () => {
// localStorage.clear();
// await Promise.all(testCases.map(({ path, typeName }) => {
// return getSchemeableDenoDoc(path, typeName);
// }));
// },
// );

0 comments on commit 41dc277

Please sign in to comment.