diff options
| author | 2023-11-03 21:13:33 +0800 | |
|---|---|---|
| committer | 2023-11-03 21:13:33 +0800 | |
| commit | 9f0d43fe099a95ab1516ae951dcb60a89e76a5a5 (patch) | |
| tree | 51614fe47bff8bb11028a07d4a35c34c9ff6594a /docs/components/pages/TRPG-home/PackBenchmarks.tsx | |
| parent | 8f135707d069c900e055dae71e69909d6b9a41bb (diff) | |
| download | HydroRoll-9f0d43fe099a95ab1516ae951dcb60a89e76a5a5.tar.gz HydroRoll-9f0d43fe099a95ab1516ae951dcb60a89e76a5a5.zip | |
chore: delete useless codes
Diffstat (limited to 'docs/components/pages/TRPG-home/PackBenchmarks.tsx')
| -rw-r--r-- | docs/components/pages/TRPG-home/PackBenchmarks.tsx | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/docs/components/pages/TRPG-home/PackBenchmarks.tsx b/docs/components/pages/TRPG-home/PackBenchmarks.tsx deleted file mode 100644 index 0d3322c..0000000 --- a/docs/components/pages/TRPG-home/PackBenchmarks.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import { useState } from "react"; -import { FadeIn } from "../home-shared/FadeIn"; -import { SectionHeader, SectionSubtext } from "../home-shared/Headings"; -import { BenchmarksGraph } from "./PackBenchmarksGraph"; -import { PackBenchmarksPicker } from "./PackBenchmarksPicker"; -import { PackBenchmarkTabs } from "./PackBenchmarkTabs"; - -export type BenchmarkNumberOfModules = "1000" | "5000" | "10000" | "30000"; -export type BenchmarkCategory = - | "cold" - | "from_cache" - | "file_change" - | "code_build" - | "build_from_cache"; -export interface BenchmarkData { - HydroRoll: number; - Shiki: number; - OlivOS: number; - SealDice: number; -} - -export interface BenchmarkBar { - label: string; - key: keyof BenchmarkData; - core?: true; - swc?: true; -} - -export const DEFAULT_BARS: BenchmarkBar[] = [ - { - key: "HydroRoll", - label: "HydroRoll水系", - core: true, - }, - { - key: "Shiki", - label: "溯洄Shiki", - }, - { - key: "OlivOS", - label: "OlivOS青果", - swc: true, - }, - { - key: "SealDice", - label: "SealDice海豹", - }, -]; -export const HMR_BARS: BenchmarkBar[] = [ - { - key: "HydroRoll", - label: "HydroRoll水系", - core: true, - }, - { - key: "Shiki", - label: "溯洄Shiki", - }, - { - key: "OlivOS", - label: "OlivOS青果", - swc: true, - }, - { - key: "SealDice", - label: "SealDice海豹", - }, -]; - -export function PackBenchmarks() { - const [numberOfModules, setNumberOfModules] = - useState<BenchmarkNumberOfModules>("1000"); - const [category, setCategory] = useState<BenchmarkCategory>("cold"); - - return ( - <FadeIn className="relative flex flex-col items-center justify-center w-full gap-10 py-16 font-sans md:py-24 lg:py-32"> - <div className="flex flex-col items-center gap-5 md:gap-6"> - <SectionHeader>速度不止于此</SectionHeader> - <SectionSubtext> - 快速加载,模块化设计,fastapi、aiohttp、flask等高效率支持库, - 为核心提速。 - </SectionSubtext> - </div> - <div className="flex flex-col items-center w-full"> - <PackBenchmarkTabs onTabChange={setCategory} /> - <BenchmarksGraph - category={category} - numberOfModules={numberOfModules} - bars={DEFAULT_BARS} - /> - </div> - <PackBenchmarksPicker - setNumberOfModules={setNumberOfModules} - ></PackBenchmarksPicker> - </FadeIn> - ); -} |
