If you compile it to WebAssembly, it will works under the single thread
model. However, there are still multi *goroutine *be created, it was
designed to.
在2024年9月10日星期二 UTC+8 21:54:56 写道:
> Hello,
>
> Maybe the question has already been asked, but I would be glad to have
> your feedback.
>
>
I'm working on the project https://github.com/Zxilly/go-size-analyzer, a
program that can be very memory intensive, so I've written some scripts to
fetch the pprof file during integration testing, and I'm using python's
psutil to read the cpu and memory usage to automatically plot into the
im
Simply, cover for text format coverage and covdata for bianry format.
在2024年7月10日星期三 UTC+8 18:07:21 写道:
> what is the difference between go tool cover and go tool covdata ?
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from t
Please try https://github.com/Zxilly/go-size-analyzer . I created this
based on reverse engineering, so only the bytes in the final build will be
count.
在2024年6月18日星期二 UTC+8 01:14:09 写道:
> Are there other tools that may show the final size? I'd like to see if
> there are more aggressive flags
Hello go-nuts,
I'm excited to share a new tool that has landed in our Go ecosystem:
go-size-analyzer. This utility is designed to give you a clear picture of
the size of your compiled Go binaries, with a focus on how dependencies
contribute to the overall footprint.
It simplifies the process
try debug.ReadBuildInfo(), then iterate the pair in the buildinfo.Settings
在2024年5月13日星期一 UTC+8 20:56:51 写道:
> Is there a way in go to find whether a go binary is built with -cover flag
> ?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To un
golang will embed the path of the source file into the binary, also the
.gopclntab will contains the path.
try use -trimpath and see if there's any change.
在2024年4月27日星期六 UTC+8 01:28:05 写道:
> Hi All,
>
> *Does anybody have experience in how the use of CGO and dynamic linking
> may affect the re
Yesterday, I reported an issue on debug/gosym at issues/65232 regarding the
difference between the symbol table and gopclntab. A member of the Go team
informed me that the start of the .text segment is not always kept the same
as 'runtime.text' value.
I am curious about how the compiler sets th
Thanks for taking the time for the clue. It seems that this is an open
issue.
Actually, It work for this case. aovid the alloc will have more benefit for
gc.
在2022年8月26日星期五 UTC+8 02:49:08 写道:
> Actually, looking more closely at your benchmark numbers, the trick does
> not work in your case.
I was try using net.Buffers for writev. But I meet a unexptected allocs in
benchmark.
https://go.dev/play/p/SHpxSYbP1I5
when I run the benchmark:
goos: linux
goarch: amd64
pkg: writev
BenchmarkWrite_Writev/escape-4 272901 4198 ns/op
24 B/op 1 allocs/
evaluated immediately, but the execution only
> happens later
>
> - sean
>
> On Sat, Jun 25, 2022, 21:40 Lee Chou wrote:
>
>> Hello,
>>
>> https://go.dev/play/p/J1tVplkIrjt
>>
>> why o1.Ref print `2` but p1.Ref print `1` ?
>> why o1.Ref pri
Hello,
https://go.dev/play/p/J1tVplkIrjt
why o1.Ref print `2` but p1.Ref print `1` ?
why o1.Ref print `2` but o2.NonRef print `3` ? it's so confused.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop rec
rw.r.Intn(rw.sumOfWeights)
//fmt.Printf("rand val: %d\n",randomWeight)
...
}
I am sorry about that I did't give the context of my code.
在 2019年6月27日星期四 UTC+8上午11:22:49,Kurtis Rader写道:
>
> On Wed, Jun 26, 2019 at 8:18 PM Chou Yan > wrote:
>
>> I fix it by :
>>
&g
ializing the RNG in a tight loop. Since
> `time.Now().Unix()` has a resolution of one second you end up generating
> the same initial value every time through the loop until the current time
> advances to the next second.
>
> On Wed, Jun 26, 2019 at 7:48 PM Chou Yan > wrote:
,errors.New("get next err")
}
return no, nil
}
}
thx
在 2019年6月27日星期四 UTC+8上午11:16:01,Chou Yan写道:
>
> The situation I am currently experiencing is that it only occur on my
> online app. I try it at local but I can not got the result.
> haha... I make a mistake.
> the code i
6月27日星期四 UTC+8上午10:52:56,Burak Serdar写道:
>
> On Wed, Jun 26, 2019 at 8:48 PM Chou Yan > wrote:
> >
> > like this:
> > r:=rand.New(rand.NewSource(time.Now().Unix()))
> > for {
> > r.Intn(96)
> > }
> > I know the same seed will generate t
o()', It will not.
I suspect what this is related to the seqence rand algorithm,But I have no
relevant evidence
在 2019年6月27日星期四 UTC+8上午10:32:38,Burak Serdar写道:
>
> On Wed, Jun 26, 2019 at 8:17 PM Chou Yan > wrote:
> >
> > I use:
> > r:=rand.New(rand.NewSource(t
I use:
r:=rand.New(rand.NewSource(time.Now().Unix()))
r..Intn(96)
I got:
and val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand val: 82
rand
I use 'debug.FreeOsMemory'. But it is not the certain.
在 2019年6月24日星期一 UTC+8上午10:59:06,Chou Yan写道:
>
> My server have 100G memory.
> I limit my server 60G by cgroups.
> But my app process use the momory more and more !
> even more than 50G.
> my prof:
>
> # He
I am use 'debug.FreeOsMemory'. But it is not the certain.
在 2019年6月24日星期一 UTC+8上午10:59:06,Chou Yan写道:
>
> My server have 100G memory.
> I limit my server 60G by cgroups.
> But my app process use the momory more and more !
> even more than 50G.
> my prof:
40585/0+297 ms
cpu, 22495->22569->4643 MB, 23425 MB goal, 64 P
在 2019年6月24日星期一 UTC+8上午10:59:06,Chou Yan写道:
>
> My server have 100G memory.
> I limit my server 60G by cgroups.
> But my app process use the momory more and more !
> even more than 50G.
> my prof:
>
>
My server have 100G memory.
I limit my server 60G by cgroups.
But my app process use the momory more and more !
even more than 50G.
my prof:
# HeapIdle = 27377164288
# HeapInuse = 21910396928
The Cgroup will kill the process when it use more than 60G
But golang runtime gc will not release the
thx
在 2019年6月21日星期五 UTC+8下午12:38:50,Ian Lance Taylor写道:
>
> On Thu, Jun 20, 2019 at 7:22 PM Chou Yan > wrote:
> >
> > The describe 'release the physical memory' may not be rigorous. Because
> gc remand the span,obj, or big obj to heap or central area, may
during sweep termination?
在 2019年6月21日星期五 UTC+8上午8:54:31,Ian Lance Taylor写道:
>
> On Thu, Jun 20, 2019 at 9:56 AM Chou Yan > wrote:
> >
> > I look up the doc for gctrace:
> > https://godoc.org/runtime
> > it show us:
> >
> > Currently, it is:
>
weep = scan the root span', like java cms 'gc root scan'?
not the release the physical memory?
在 2019年6月21日星期五 UTC+8上午8:54:31,Ian Lance Taylor写道:
>
> On Thu, Jun 20, 2019 at 9:56 AM Chou Yan > wrote:
> >
> > I look up the doc for gctrace:
> > https://god
I look up the doc for gctrace:
https://godoc.org/runtime
it show us:
Currently, it is:
gc # @#s #%: #+#+# ms clock, #+#/#/#+# ms cpu, #->#-># MB, # MB goal, #
P
where the fields are as follows:
gc #the GC number, incremented at each GC
@#s time in seconds s
sorry for late reply. thanks very much. it got the key.
在 2019年1月11日星期五 UTC+8下午10:09:17,Jan Mercl写道:
>
>
> On Fri, Jan 11, 2019 at 2:49 PM > wrote:
>
> > I get the file 'exit0', but didn't get the file 'exit1'.
>
> As far as I can tell, it works as expected. Exit handlers are called when
> libc's
Hi everyone,
I want to set a callback for atexit, but it seems doesn't work.
This is my code.
package main
/*
#include
extern void AtExit();
static inline set_atexit() {
atexit(AtExit);
AtExit();
}
*/
import "C"
import (
"fmt"
"io/ioutil"
"time"
)
var n = 0
//expor
I want to buy one, is it released out?
在 2017年9月5日星期二 UTC+8上午7:41:36,st ov写道:
>
> Any information on the contents and a release date?
>
> Couldn't find any details on O'reilly, Amazon or dave.cheney.net.
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts
stant anymore. The minimum Go would need, to
> make constants addressable would be some notion of const-pointers (that is,
> pointers which don't allow modification of the pointee).
>
> May I ask why it would be interesting to take the address of a constant?
>
> On Mon, Aug 21,
I guess that const will be substitute literally at compile time
for performance improvements. So there is not such variable in
run time.
Is it right?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receivi
ul 13, 2017 at 9:15 PM, Chifeng Chou > wrote:
> >
> > I implemented a weighted fair queue using a naive approach which is
> giving
> > different amount of attempts according to weights to access upstreams.
> > However, when calls of fetch() come very fast, our inter
I implemented a weighted fair queue using a naive approach which is giving
different amount of attempts according to weights to access upstreams.
However, when calls of fetch() come very fast, our internal sync constructs
are not ready(when *select*) and many attempts are simply wasted.
It seems
33 matches
Mail list logo