aboutsummaryrefslogtreecommitdiff
path: root/lib/debug
AgeCommit message (Collapse)Author
2026-01-15all: convert license and copyright to use SPDX identifiersShulhan
With help of spdxconv tool [1], we able to bulk update all files license and copyright format to comply with SPDX formats. [1] https://kilabit.info/project/spdxconv/
2025-01-23lib/debug: remove the global Value variableShulhan
Using global variable inside one package is a mistake. If, for example, package X set debug.Value to 1, another packages that does need to be debugged will print unnecessary log messages.
2023-09-11lib/debug: realign struct profileShulhan
The realignment reduce the struct size from 32 to 24 bytes.
2022-05-09all: reformat all codes using gofmt 1.19 (the Go tip)Shulhan
2020-06-10all: update email addressShulhan
2020-06-06all: use default linter optionsShulhan
2020-03-24debug: add a wrapper for starting and stopping CPU profileShulhan
2019-06-14all: fix nolint formatShulhan
The valid syntax to suppress linter warnings is "//nolint:<name>" with no space between comment and "nolint" and between ":". Also, we move the placement of nolint directive to the top of statements for multiple nolint in the same scope. While at it, fix and supress some linter warnings.
2019-03-01all: fix warnings from linterShulhan
Most of the warnings caused by update to linter which cause global variables declared with grouping "( ... )" and that has been suppressed, are become false-positive again.
2019-02-01lib/debug: add function to write heap profile to fileShulhan
WriteHeapProfile write memory profile into "/tmp/{prefix}.pid.heap.pprof". If keepAlive is true, the file will be keep opened until error happened, or caller send keepAlive=false, or when program end.
2019-01-29lib/debug: add type to store relative and difference on memory heapShulhan
This type, MemHeap, is simplified value of runtime.MemStats. The MemHeap represent the growth of heap memory in bytes and in number of allocated objects.
2018-11-30all: minimize and suppress linter warnings for global variablesShulhan
2018-11-29lib/debug: ignore lint on init functionShulhan
2018-09-14lib/debug: new package for debuggingShulhan
The debug package provide global Value that is initialized from environment variable "DEBUG". User only need to include the package, and all initialization will be handled by init().