Skip to content

Commit da16002

Browse files
committed
docs
1 parent e806c5d commit da16002

47 files changed

Lines changed: 511 additions & 1051 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/.gitignore

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/README.md

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,44 @@
1-
# Website
1+
# Mintlify Starter Kit
22

3-
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
3+
Use the starter kit to get your docs deployed and ready to customize.
44

5-
### Installation
5+
Click the green **Use this template** button at the top of this repo to copy the Mintlify starter kit. The starter kit contains examples with
6+
7+
- Guide pages
8+
- Navigation
9+
- Customizations
10+
- API reference pages
11+
- Use of popular components
12+
13+
**[Follow the full quickstart guide](https://starter.mintlify.com/quickstart)**
14+
15+
## Development
16+
17+
Install the [Mintlify CLI](https://www.npmjs.com/package/mint) to preview your documentation changes locally. To install, use the following command:
618

719
```
8-
$ npm install
20+
npm i -g mint
921
```
1022

11-
### Local Development
23+
Run the following command at the root of your documentation, where your `docs.json` is located:
1224

1325
```
14-
$ npm run start
26+
mint dev
1527
```
1628

17-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
29+
View your local preview at `http://localhost:3000`.
1830

19-
### Build
31+
## Publishing changes
2032

21-
```
22-
$ npm run build
23-
```
33+
Install our GitHub app from your [dashboard](https://dashboard.mintlify.com/settings/organization/github-app) to propagate changes from your repo to your deployment. Changes are deployed to production automatically after pushing to the default branch.
34+
35+
## Need help?
2436

25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
37+
### Troubleshooting
2638

27-
### Deployment
39+
- If your dev environment isn't running: Run `mint update` to ensure you have the most recent version of the CLI.
40+
- If a page loads as a 404: Make sure you are running in a folder with a valid `docs.json`.
2841

29-
Deployment is done automatically via GitHub Actions when the Pull Request changes are merged to the `main` branch.
42+
### Resources
43+
- [Mintlify documentation](https://mintlify.com/docs)
44+
- [Mintlify community](https://mintlify.com/community)

docs/babel.config.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/docs/codeflash-concepts/benchmarking.md renamed to docs/codeflash-concepts/benchmarking.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
---
2-
sidebar_position: 2
2+
title: "How Codeflash Measures Code Runtime"
3+
description: "Learn how Codeflash accurately measures code performance using multiple runs and minimum timing"
4+
icon: "stopwatch"
5+
sidebarTitle: "Runtime Measurement"
6+
keywords: ["benchmarking", "performance", "timing", "measurement", "runtime", "noise reduction"]
37
---
48

59
# How Codeflash measures code runtime
@@ -70,7 +74,7 @@ You ask the driver to repeat the race multiple times. In this scenario, since th
7074

7175
This gives us timing data (in hours) that looks like the following.
7276

73-
![img_2.png](img_2.png)
77+
![img_2.png](./img_2.png)
7478

7579
With 100 data points (50 per train), determining the faster train becomes more complex.
7680

@@ -120,7 +124,7 @@ We can only measure times between adjacent stations.
120124

121125
Here is how the timing data looks like (in hours):
122126

123-
![img_1.png](img_1.png)
127+
![img_1.png](./img_1.png)
124128

125129
With 300 data points (50 runs × 3 segments × 2 trains) and varying conditions on each segment,
126130
determining the faster train becomes even more challenging.

docs/docs/codeflash-concepts/how-codeflash-works.md renamed to docs/codeflash-concepts/how-codeflash-works.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
---
2-
sidebar_position: 1
2+
title: "How Codeflash Works"
3+
description: "Understand Codeflash's generate-and-verify approach to code optimization and correctness verification"
4+
icon: "gear"
5+
sidebarTitle: "How It Works"
6+
keywords: ["architecture", "verification", "correctness", "testing", "optimization", "LLM", "benchmarking"]
37
---
48
# How Codeflash Works
59

@@ -24,7 +28,7 @@ Codeflash currently only runs tests that directly call the target function in th
2428
To optimize code, Codeflash first gathers all necessary context from the codebase. It also line-profiles your code to understand where the bottlenecks might reside. It then calls our backend to generate several candidate optimizations. These are called "candidates" because their speed and correctness haven't been verified yet. Both properties will be verified in later steps.
2529
## Verification of correctness
2630

27-
![Verification](/img/codeflash_arch_diagram.gif)
31+
![Verification](/images/codeflash_arch_diagram.gif)
2832

2933
The goal of correctness verification is to ensure that when the new code replaces the original code, there are no behavioral changes in the code and the rest of the system. This means the replacement should be completely safe.
3034

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
---
2-
sidebar_position: 5
2+
title: "Manual Configuration"
3+
description: "Configure Codeflash for your project with pyproject.toml settings and advanced options"
4+
icon: "gear"
5+
sidebarTitle: "Configuration"
6+
keywords: ["configuration", "pyproject.toml", "setup", "settings", "pytest", "formatter"]
37
---
48

59
# Manual Configuration

docs/docs.json

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
"$schema": "https://mintlify.com/docs.json",
3+
"theme": "aspen",
4+
"name": "Codeflash Documentation",
5+
"colors": {
6+
"primary": "#2563EB",
7+
"light": "#3B82F6",
8+
"dark": "#1D4ED8"
9+
},
10+
"favicon": "/favicon.ico",
11+
"navigation": {
12+
"tabs": [
13+
{
14+
"tab": "Documentation",
15+
"groups": [
16+
{
17+
"group": "🏠 Overview",
18+
"pages": [
19+
"index"
20+
]
21+
},
22+
{
23+
"group": "🚀 Getting Started",
24+
"pages": [
25+
"getting-started/local-installation",
26+
"getting-started/codeflash-github-actions"
27+
]
28+
},
29+
{
30+
"group": "⚡ Optimization Workflows",
31+
"pages": [
32+
"optimizing-with-codeflash/one-function",
33+
"optimizing-with-codeflash/trace-and-optimize",
34+
"optimizing-with-codeflash/codeflash-all",
35+
{
36+
"group": "CI/CD Integration",
37+
"pages": [
38+
"optimizing-with-codeflash/optimize-prs",
39+
"optimizing-with-codeflash/benchmarking"
40+
]
41+
}
42+
]
43+
},
44+
{
45+
"group": "🧠 Core Concepts",
46+
"pages": [
47+
"codeflash-concepts/how-codeflash-works",
48+
"codeflash-concepts/benchmarking"
49+
]
50+
},
51+
{
52+
"group": "⚙️ Configuration & Best Practices",
53+
"pages": [
54+
"configuration",
55+
"getting-the-best-out-of-codeflash"
56+
]
57+
}
58+
]
59+
}
60+
],
61+
"global": {
62+
"anchors": [
63+
{
64+
"anchor": "GitHub",
65+
"href": "https://github.com/codeflash-ai",
66+
"icon": "github"
67+
},
68+
{
69+
"anchor": "Discord",
70+
"href": "https://www.codeflash.ai/discord",
71+
"icon": "discord"
72+
}
73+
]
74+
}
75+
},
76+
"logo": {
77+
"light": "/images/codeflash_light.svg",
78+
"dark": "/images/codeflash_darkmode.svg"
79+
},
80+
"navbar": {
81+
"links": [
82+
{
83+
"label": "Contact",
84+
"href": "mailto:contact@codeflash.ai"
85+
},
86+
{
87+
"label": "Blog",
88+
"href": "https://www.codeflash.ai/blog"
89+
}
90+
],
91+
"primary": {
92+
"type": "button",
93+
"label": "Try Codeflash",
94+
"href": "https://www.codeflash.ai"
95+
}
96+
},
97+
"contextual": {
98+
"options": [
99+
"copy"
100+
]
101+
},
102+
"redirects": [
103+
{
104+
"source": "/docs/:path*",
105+
"destination": "/:path*"
106+
}
107+
],
108+
"footer": {
109+
"socials": {
110+
"discord": "https://www.codeflash.ai/discord",
111+
"github": "https://github.com/codeflash-ai",
112+
"linkedin": "https://www.linkedin.com/company/codeflash-ai"
113+
}
114+
}
115+
}

docs/docs/codeflash-concepts/_category_.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)