Compare commits

..
4 Commits
Author SHA1 Message Date
niggl ef25adf5ed refactor(models): Group now only has a name
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/tag/release Pipeline was successful
2024-12-12 18:48:39 +01:00
niggl c09c00ec68 feat(pdfs): Set download names for pdf generation responses
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/tag/release Pipeline was successful
2024-12-12 18:24:07 +01:00
niggl 1f4981b0a9 fix(config): Don't fail on missing env
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/tag/release Pipeline was successful
2024-12-12 18:18:41 +01:00
niggl c9f28612be docs(README): Updated benchmark section
ci/woodpecker/tag/release Pipeline was successful
2024-12-12 18:05:52 +01:00
6 changed files with 17 additions and 16 deletions
+12 -12
View File
@@ -79,18 +79,18 @@ docker buildx build --platform=linux/amd64,linux/arm64 -t registry.odit.services
- Width: 1000
- Height: 500
#### No cache
#### No cache (cold start)
| Format | Requests/sec | Slowest | Fastest | Average |
| ------- | ------------ | ------- | ------- | ------- |
| Code128 | 763.3996 | 0.7995 | 0.0172 | 0.0654 |
| EAN13 | 767.1170 | 0.7607 | 0.0171 | 0.0651 |
| QR | 683.8472 | 0.6528 | 0.0178 | 0.0730 |
| Format | Data | Requests/sec | Slowest | Fastest | Average |
| ------- | -------------- | ------------ | ------- | ------- | ------- |
| Code128 | `123456789123` | 763.3996 | 0.7995 | 0.0172 | 0.0654 |
| EAN13 | `123456789123` | 767.1170 | 0.7607 | 0.0171 | 0.0651 |
| QR | `123456789123` | 683.8472 | 0.6528 | 0.0178 | 0.0730 |
#### Redis cache
#### Redis cache (warm start)
| Format | Requests/sec | Slowest | Fastest | Average |
| ------- | ------------ | ------- | ------- | ------- |
| Code128 | 15611.5521 | 0.0965 | 0.0006 | 0.0032 |
| EAN13 | 14985.4401 | 0.0925 | 0.0006 | 0.0033 |
| QR | 14306.2540 | 0.1143 | 0.0005 | 0.0035 |
| Format | Data | Requests/sec | Slowest | Fastest | Average |
| ------- | -------------- | ------------ | ------- | ------- | ------- |
| Code128 | `123456789123` | 15611.5521 | 0.0965 | 0.0006 | 0.0032 |
| EAN13 | `123456789123` | 14985.4401 | 0.0925 | 0.0006 | 0.0033 |
| QR | `123456789123` | 14306.2540 | 0.1143 | 0.0005 | 0.0035 |
+1
View File
@@ -69,6 +69,7 @@ func (h *DefaultHandler) GenerateCard(c *fiber.Ctx) error {
}
c.Set(fiber.HeaderContentType, "application/pdf")
c.Set(fiber.HeaderContentDisposition, "attachment; filename=runner-cards.pdf")
return c.Send(pdf)
}
+1
View File
@@ -69,6 +69,7 @@ func (h *DefaultHandler) GenerateCertificate(c *fiber.Ctx) error {
}
c.Set(fiber.HeaderContentType, "application/pdf")
c.Set(fiber.HeaderContentDisposition, "attachment; filename=certificate.pdf")
return c.Send(pdf)
}
+1
View File
@@ -72,6 +72,7 @@ func (h *DefaultHandler) GenerateContract(c *fiber.Ctx) error {
}
c.Set(fiber.HeaderContentType, "application/pdf")
c.Set(fiber.HeaderContentDisposition, "attachment; filename=runner-contracts.pdf")
return c.Send(pdf)
}
+1 -1
View File
@@ -45,7 +45,7 @@ func loadEnv() error {
viper.AutomaticEnv()
err := viper.ReadInConfig()
if err != nil {
return err
log.Println("No .env file found")
}
// Unmarshal the config from file and env into the config struct
+1 -3
View File
@@ -14,9 +14,7 @@ type Runner struct {
}
type Group struct {
ID int `json:"id" validate:"required"`
Name string `json:"name" validate:"required"`
ParentGroup *Group `json:"parent_group" validate:"optional"`
Name string `json:"name" validate:"required"`
}
type ContractTemplateOptions struct {