Dnia 2022-08-31, o godz. 00:00:41
ag9920 napisaĆ(a):
If you are in windows ecosystem exclude your development areas, including
go installation and gocache from antivirus "heuristics". While at last most of
AV
vendors "discovered" that Go exists and it has its own linker, some dutifully
sends
Setting GODEBUG=inittrace=1 will log a trace of init function execution,
which you can use to determine if init is slow, and if so which packages.
e.g., `GODEBUG=inittrace=1 go version` ends with "init main @9.5 ms",
indicating that it look 9.5ms to run all init functions.
The format is
On Wed, Aug 31, 2022 at 9:00 AM ag9920 wrote:
> Hi, recently I've been trying to make my unit test faster. It seems too much
> time were spent on initialization.
The "seems" part is a guess or a measurement? How much is "too much time"?
> After removing all init() function in relevant
On Wed, Aug 31, 2022 at 9:01 AM ag9920 wrote:
> Hi, recently I've been trying to make my unit test faster. It seems too
> much time were spent on initialization. After removing all init() function
> in relevant packages. The speed was still very slow.It even takes dozens of
> seconds before
Hi, recently I've been trying to make my unit test faster. It seems too
much time were spent on initialization. After removing all init() function
in relevant packages. The speed was still very slow.It even takes dozens of
seconds before entering my real unit test function.
So I take a look at