This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/592-implement-heat-map-on-the-fron…
…tend
- Loading branch information
Showing
95 changed files
with
5,172 additions
and
5,413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,6 @@ report.html | |
.mypy_cache | ||
.install | ||
|
||
### dotenv ### | ||
.env | ||
### Emacs ### | ||
# -*- mode: gitignore; -*- | ||
*~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/src/schema.rs | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,56 @@ | ||
# Benchmarks | ||
|
||
This folder contains scripts to run benchmarks for PermaplanT. | ||
## Requirements | ||
|
||
- nodejs 20 | ||
- npm | ||
|
||
## Installation and Usage | ||
|
||
1. Install dependencies | ||
|
||
```shell | ||
npm install | ||
``` | ||
|
||
2. Start the backend from the backend folder | ||
|
||
```shell | ||
cargo run | ||
``` | ||
|
||
3. Start the frontend from the frontend folder | ||
|
||
```shell | ||
npm run dev | ||
``` | ||
|
||
4. Run benchmarks | ||
|
||
```shell | ||
npm run benchmark | ||
``` | ||
|
||
## Benchmarking | ||
|
||
The benchmarking script runs a performance audit on a web page using [Lighthouse](https://github.com/GoogleChrome/lighthouse) and [Playwright](https://playwright.dev/). | ||
The audit measures the performance of a web page by generating a performance score and then saves the results of the audit in `report` folder: | ||
|
||
- `<test_name>-report.json` - the raw report of LightHouse for a single test case defined in `performance-audit.spec.js` | ||
- `<timestamp>-lighthouse-results.csv` - the results of the audit for all test cases | ||
|
||
Metrics: | ||
|
||
- `First Contentful Paint (FCP)` - the time it takes for the browser to render the first bit of content on the page. Measured in milliseconds. | ||
- `Interactive` - the time it takes for the page to become fully interactive. Measured in milliseconds. | ||
- other metrics are described in the [Chrome Developers documentation](https://web.dev/performance-scoring/) | ||
|
||
Pages to audit are defined in `performance-audit.spec.js` file as individual test cases. | ||
In order to add new pages to the audit, add a new test case to the file e.g.: | ||
|
||
```javascript | ||
test("Another page", async () => { | ||
const testname = "Another page"; | ||
await audit(testname, "http://localhost:5173/another_page", results); | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Env variables must have the prefix VITE_ for Vite to include them. | ||
// More information about env variables with Vite can be found here: https://vitejs.dev/guide/env-and-mode.html | ||
|
||
VITE_BASE_API_URL=http://localhost:8080 | ||
VITE_NEXTCLOUD_URI=https://cloud.permaplant.net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This file is used by the build system to provide environment variables to the application. | ||
|
||
VITE_BASE_API_URL="/" | ||
VITE_NEXTCLOUD_URI="https://cloud.permaplant.net" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,5 @@ src/generated/* | |
*.sln | ||
*.sw? | ||
|
||
.env | ||
|
||
# storybook build | ||
storybook-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.