server

command
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2024 License: MIT Imports: 26 Imported by: 0

README

server

The cmd/server application displays benchmark and verification results as web pages.

Server Pages

The home page shows links to various test data pages and the warnings: The home page shows links to various test data pages and the warnings.

Test pages show the same tables as tabular plus charts comparing the results: Test pages show the same tables as tabular plus charts comparing the results.

Handler pages show similar tables plus charts comparing the results: Handler pages show similar tables plus charts comparing the results.

The scores page shows how different handlers related on a functionality vs. performance chart: Scores page shows how different handlers related on a functionality vs. performance chart

The warning page shows all the defined warnings with descriptions: The warning page shows all the defined warnings with descriptions.

GitHub Pages

Once a week (or whenever code is committed to the go-slog repository) the server is run and all pages are copied to the docs directory. This is committed back into the repository and GitHub Pages serves the recent benchmark data.

Documentation

Overview

server parses benchmark test and verification test output and displays it via web pages.

Usage

go run cmd/server/server.go [flags]

The flags are:

-bench string
    Load benchmark Data from Path (optional)
-language value
    One or more language tags to be tried, defaults to US English.
-useWarnings
    Show warning instead of known errors, defaults true
-verify string
    Load verification Data from Path (optional)

The scripts/server script will run cmd/server, taking input from temporary files created by scripts/verify and scripts/bench.

The -language flag is used to enable proper formatting of displayed numbers.

Output

GOROOT=/snap/go/current #gosetup
GOPATH=/home/madkins23/go #gosetup
/snap/go/current/bin/go build -o /home/madkins23/.cache/JetBrains/GoLand2023.3/tmp/GoLand/___run_server /home/madkins23/work/go/src/github.com/madkins23/go-slog/cmd/server/server.go #gosetup
/home/madkins23/.cache/JetBrains/GoLand2023.3/tmp/GoLand/___run_server -bench=/tmp/go-slog/bench.txt -verify=/tmp/go-slog/verify.txt
12:31:18 WRN Creating an Engine instance with the Logger and Recovery middleware already attached.
12:31:18 WRN Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)
12:31:18 INF Web Server @ http://localhost:8080/go-slog
12:31:19 INF HasTest() test=Verify$KeyCase found=true
12:31:19 INF 200 |    5.012399ms |             ::1 | GET      "/go-slog/test/Verify$KeyCase.html"
12:31:19 INF 200 |      46.763µs |             ::1 | GET      "/go-slog/home.svg"
12:31:19 INF 200 |     169.933µs |             ::1 | GET      "/go-slog/style.css"

Notes

The use of gin-gonic/gin is probably unnecessary aside from demonstrating the use of the gin package defined in this repository.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL