Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions frameworks/Go/pine/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Pine Benchmarking Test

## Test URLs

### JSON

http://localhost:8080/json

### PLAINTEXT

http://localhost:8080/plaintext
26 changes: 26 additions & 0 deletions frameworks/Go/pine/benchmark_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"framework": "pine",
"tests": [
{
"default": {
"json_url": "/json",
"plaintext_url": "/plaintext",
"port": 8080,
"approach": "Realistic",
"classification": "Micro",
"database": "None",
"framework": "Pine",
"language": "Go",
"flavor": "None",
"orm": "None",
"platform": "None",
"webserver": "None",
"os": "Linux",
"database_os": "Linux",
"display_name": "Pine",
"notes": "",
"versus": "go"
}
}
]
}
10 changes: 10 additions & 0 deletions frameworks/Go/pine/pine.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM docker.io/golang:1.23

COPY ./src /pine
WORKDIR /pine

RUN go mod download

EXPOSE 8080

CMD go run .
5 changes: 5 additions & 0 deletions frameworks/Go/pine/src/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module pine

go 1.23.0

require github.com/BryanMwangi/pine v1.0.6
2 changes: 2 additions & 0 deletions frameworks/Go/pine/src/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/BryanMwangi/pine v1.0.6 h1:35JN1FQkStoCikeVQJ2423mO5STLNEPkA/AgnjslAmg=
github.com/BryanMwangi/pine v1.0.6/go.mod h1:j6+gT+N2HeeJHc9Z60rUOnEmNC+s/Gdmh2e9oB/eScI=
28 changes: 28 additions & 0 deletions frameworks/Go/pine/src/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package main

import (
"log"

"github.com/BryanMwangi/pine"
)

func plaintextHandler(c *pine.Ctx) error {
c.Set("Server", "Pine")
return c.SendString("Hello, World!")
}

func jsonHandler(c *pine.Ctx) error {
c.Set("Server", "Pine")
return c.JSON(map[string]string{
"message": "Hello, World!",
})
}

func main() {
app := pine.New()
app.Get("/plaintext", plaintextHandler)
app.Get("/json", jsonHandler)

// Start the server on port 3000
log.Fatal(app.Start(":8080"))
}
Loading