On Monday, March 9, 2020 at 1:37:00 PM UTC-4, Nitish Saboo wrote:
>
> Hi Jake,
>
> The memory usage remains constant when the rest of the service is
> running.Only when LoadPatternDB() method is called within the service,
> Memory Consumption increases which actually should not happen.
> I am a
Also worth adding some unit tests, including one which reproduces your 404
error.
See https://www.youtube.com/watch?v=hVFEV-ieeew for a great video about how
to
add these tests.
On Monday, 9 March 2020 14:53:20 UTC, anderso...@blacklane.com wrote:
>
> please post the code as text. Either in a
Hi Jake,
The memory usage remains constant when the rest of the service is
running.Only when LoadPatternDB() method is called within the service,
Memory Consumption increases which actually should not happen.
I am assuming if there is a memory leak while calling this method because
the memory usa
I'm using Uber's zap logger in production systems (
https://github.com/uber-go/zap). It is designed to emit structured JSON
logs and do the minimal amount of allocations possible. It's a completely
different interface from Go's log package, but that is where the efficiency
comes from. I'd highly re
пн, 9 мар. 2020 г. в 19:36, Axel Wagner :
> IMO, there really isn't a super good answer. The simple answer is: You
> need to delay the actual `fmt.Sprintf` call as long as possible. Which
> generally means, that the interface you consume (to allow the user to
> direct and configure logging) will n
пн, 9 мар. 2020 г. в 19:41, andrey mirtchovski :
> to avoid allocations you have to hint at the type of what you're going
> to print. for example see/use zerolog: https://github.com/rs/zerolog
Tanks, I saw it. But mostly i want to avoid typing hint
--
Vasiliy Tolstov,
e-mail: v.tols...@selfip.
to avoid allocations you have to hint at the type of what you're going
to print. for example see/use zerolog: https://github.com/rs/zerolog
On Mon, Mar 9, 2020 at 10:36 AM 'Axel Wagner' via golang-nuts
wrote:
>
> IMO, there really isn't a super good answer. The simple answer is: You need
> to de
IMO, there really isn't a super good answer. The simple answer is: You need
to delay the actual `fmt.Sprintf` call as long as possible. Which generally
means, that the interface you consume (to allow the user to direct and
configure logging) will need to reflect formatting and all kinds of things
t
On Mon, Mar 9, 2020 at 4:16 PM Yuu LongXue wrote:
>
> Hi all,
>
> Slice is not thread safe for write operation if without lock, this is true
> and I know this feature. but recently, I got a panic which caused by writing
> a slice concurrently with out lock occasionally and I can't figure out why
You may indeed have a leak. I did not check your code that carefully. But i
do wonder about your statement:
>
> 1)As soon as I call LoadPatternDB() method in parser.go there is some
> increase in memory consumption(some memory leak). Ideally that should not
> have happened.
>
Go is a garbage c
It seems like you start your post by acknowledging that you have a race.
But you are wondering why that race is causing a panic? Is that a correct
assessment of you post?
A race condition can cause all sorts of bad behavior. Some may behave
"normally" 99.9% of the time, then cause an incorr
On Mon, Mar 9, 2020 at 9:16 AM Yuu LongXue wrote:
>
> Hi all,
>
> Slice is not thread safe for write operation if without lock, this is true
> and I know this feature. but recently, I got a panic which caused by writing
> a slice concurrently with out lock occasionally and I can't figure out why
Hi! I have some logging package and after memory profiling saw that for
disabled log levels i'm allocate memory for message.
For example i'm send in logger only Info level. So i want to avoid
Debug/Trace stuff.
but memory profiling says that for call log.Tracef("my message %v", msg)
i'm allocate me
Hi all,
Slice is not thread safe for write operation if without lock, this is true and
I know this feature. but recently, I got a panic which caused by writing a
slice concurrently with out lock occasionally and I can't figure out why.
### the process as below:
1. define a slice: var x []stri
please post the code as text. Either in a github/whatever repo or here, but
please, as text and a runnable code.
I don't see you registering any handler for */register.html*, you have one
for */register* only. Also if the method is not POST, you should return *405
Method Not Allowed *instead of
Hi
Following are my Go code and C header file and C wrapper code
parser.go
==
var f *os.File
func LoadPatternDB(patterndb string) {
path := C.CString(patterndb)
defer C.free(unsafe.Pointer(path))
C.load_pattern_db(path, (C.key_value_cb)(unsafe.Pointer(C.callOnMeGo_cgo)))
}
//export Pars
16 matches
Mail list logo