Re: [go-nuts] how to get file's current offset

2019-04-18 Thread Valentin Vidic
On Thu, Apr 18, 2019 at 10:34:24PM +0800, sa517...@mail.ustc.edu.cn wrote: > I want to know file's current read offset after open a file, but I can not > found related API. > > f, err := os.Open("/tmp/") > if err != nil{ > panic(err) > } > >

Re: [go-nuts] HTTP client request rate

2019-02-08 Thread Valentin Vidic
On Fri, Feb 08, 2019 at 10:12:36PM +0100, Valentin Vidic wrote: > Yes, it is quite strange. I don't see it hitting any limits but > the request rate goes down. Seems it could be GC related since turning off GC gives 5x request rate with 20 gorutines: $ ./gb -duration 15s -parallel 5 http:/

Re: [go-nuts] HTTP client request rate

2019-02-08 Thread Valentin Vidic
On Fri, Feb 08, 2019 at 02:30:52PM -0600, robert engels wrote: > Could be many things, but a few to think about: Yes, it is quite strange. I don't see it hitting any limits but the request rate goes down. > If you run more Go routines than you have CPUs available, and the task > is CPU bound

[go-nuts] HTTP client request rate

2019-02-08 Thread Valentin Vidic
Hi, Can someone help me figure out why the performance (request rate) of this program goes down when I add more gorutines? $ ./gb -duration 15s -parallel 5 http://nginx Running 5 parallel clients for 15s... Requests: 217998 Rate: 14533.2/s Bytes: 133414776 Code[200]: 217998 $ ./gb -duration 15s

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-03 Thread Valentin Vidic
On Thu, Jan 03, 2019 at 02:46:39PM -0800, Eric Raymond wrote: > On the other hand, I believe graceful, comment-preserving C to idiomatic-Go > transpilation is almost possible. By 'almost' I mean that the tool would > pass through a small enough percentage of untranslated residuals for >

Re: [go-nuts] How to send a POST request from http.Redirect?

2017-10-28 Thread Valentin Vidic
On Fri, Oct 27, 2017 at 09:04:25PM -0700, hkang.sun...@gmail.com wrote: > I have a question about sending POST request through the http.Redirect > function. > The following is my http handler function. In this function, I get some > secret data and want to pass the data to the redirectURL. > I