Skip to content

Tags: galpt/cake-stats

Tags

v1.0.30

Toggle v1.0.30's commit message

Verified

This commit was signed with the committer’s verified signature.
galpt Galih Tama
fix: detect MIPS endianness correctly in install script

Linux's uname -m always reports 'mips' for all MIPS variants regardless
of endianness, causing the installer to download the big-endian binary
for little-endian MIPS routers like the JCG Q20 (MT7621 SoC).

Add a detect_mips_endianness() function that probes:
1. /etc/openwrt_release DISTRIB_ARCH field (covers OpenWrt)
2. /proc/cpuinfo byte order field (generic Linux)
3. readelf ELF header inspection (authoritative fallback)
4. Big-endian as the default fallback (historical convention)

This ensures JCG Q20 and other little-endian MIPS routers get the
correct linux-mipsle / linux-mips64le binary.

Signed-off-by: Galih Tama <galpt@v.recipes>

v1.0.29

Toggle v1.0.29's commit message

Verified

This commit was signed with the committer’s verified signature.
galpt Galih Tama
refactor: achieve near-zero-allocation parsing and eliminate dead code

Replace the parser's allocation-heavy text processing with a
zero-allocation approach:

- Introduce LineScanner: iterates over lines in a raw []byte slice
  without allocating per-line strings (replaces strings.Split/SplitLines)
- Introduce FieldTokenizer: tokenises a string into fields using a
  pre-allocated [64]string buffer on the stack (replaces strings.Fields)
- Replace map-based tier table storage with fixed-size arrays + linear
  scan, eliminating hash-map allocations during parsing
- Replace fmt.Sprintf with formatUint64 writing into a stack buffer
- Replace strings.Split with manual comma scanning in parseSentLine
- Hand-roll ParseUint64 to avoid strconv.ParseUint error-interface
  escape, making it truly zero-allocation (0 B/op, 19 ns/op)
- Remove dead utility functions: SplitLines, Fields, Split, SplitN
- Remove unused util.SplitLines from split.go
- Update README design notes to reflect the new parser architecture
- Add allocation benchmarks to pkg/parser to prevent regression

Results (2-interface CAKE setup):
  Before: 124 allocs/op, 21,232 B/op, 20,545 ns/op
  After:    3 allocs/op,  3,072 B/op,  9,576 ns/op
  97.6% fewer allocations, 85.5% less memory, 53% faster

Signed-off-by: Galih Tama <galpt@v.recipes>

v1.0.28

Toggle v1.0.28's commit message

Verified

This commit was signed with the committer’s verified signature.
galpt Galih Tama
refactor: remove dead code, fix documentation, and improve code quality

- Remove 7 unused functions and their associated imports and vars:
  supportsJSON, parseJSON, AfterSlash, StringToBytes, TrimPrefix,
  TrimRight, getUint
- Remove dead test TestParseJSONMinimal
- Fix contradictory package doc comment in parser.go to match the
  text-only tc parsing strategy
- Remove duplicate comment in parser_test.go, stale migration artifact
  in parser.go, and misleading reference in types.go
- Update README: bump Go version to 1.26, remove stale rtnetlink claims
- Use SplitLines instead of Split for text parsing, reanimating the
  existing utility function
- Add named constant for SSE retry interval
- Simplify dead ternary in interface count display
- Harden parseMemoryLine with parts[1] == "of" guard
- Bump go.mod and CI Go version to 1.26

Signed-off-by: Galih Tama <galpt@v.recipes>

v1.0.27

Toggle v1.0.27's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Fix reverse-proxy frontend paths

v1.0.26

Toggle v1.0.26's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
docs: emphasize installer service activation in README

v1.0.25

Toggle v1.0.25's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
docs: clarify OpenWrt install notes (git-http, ca-bundle, wget compat…

…ibility)

v1.0.24

Toggle v1.0.24's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Add OpenWrt hotplug startup fallback

v1.0.23

Toggle v1.0.23's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Fix OpenWrt reboot startup race

v1.0.22

Toggle v1.0.22's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Add OpenWrt install verification helper

v1.0.21

Toggle v1.0.21's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Fix OpenWrt autostart service setup