Comments (14)
Pushed. Looks good.
warning.GroupAttrMsgTop
was created for your handler (this is pretty normal, new handler -> new idiosyncratic behavior). It was really peculiar and took a while to nail down. Since you've reworked the group code the issue apparently went away and you can remove the warning from the test.
There's a warning.StringAny
being triggered despite not showing up in the test file. Something for me to look into.
from go-slog.
OK, should be done.
FYI: The go-slog
server pages are rebuilt every Sunday (I think). Weekly, anyway. If you tag your code it should automatically get pulled in and recalculated (and the dependencies updated in the go-slog
code base). You can always ask for an update with an issue like you did here, but if I'm out of touch or something the update should happen (eventually) anyway as long as you tag it.
from go-slog.
sorry, it's github.com/phuslu/log@6e8a3d0f36a9820bde0f0bd2862abdf33aea4292
the v1.0.93 is old one for phuslu/log#69
from go-slog.
I'm having an odd issue with some of the benchmark tests (With Group Attributes
and With Group Key Values
) with your code up through v1.0.93
. I'm not sure it's in your code, thus far I can't duplicate it outside of the benchmark suite. These two tests take inordinate amounts of time to run for some reason, and sometimes they crash. I'm still looking into this, it may be my issue. Right now it's looking like delays relate to one or more of the sync.Pool
object's you're using, I just can't figure out what triggers it.
That being said, I was able to push that version and it runs to completion in Github Actions so that's what is currently showing. The numbers are just not any better for those two tests.
When I pull the tip of your master branch I get a different error (during the verification tests):
utility.go:47:
Error Trace: /home/marc/work/go/src/github.com/madkins23/go-slog/verify/tests/utility.go:47
/home/marc/work/go/src/github.com/madkins23/go-slog/verify/tests/slogtest.go:186
Error: Received unexpected error:
invalid character '}' after top-level value: '{"time":"2024-05-02T06:43:35.148167403-07:00","level":"INFO","msg":"This is a message"}}
'
Test: TestVerifyPhusluSlog/TestWithGroupEmpty
The test is:
logger.WithGroup("group1").WithGroup("group2").Info(message, slog.Group("subGroup"))
A second test fails in a similar manner, probably with the sequence:
logger.WithGroup("group1").WithGroup("group2").Info(message)
The tip of your branch does have better numbers for the two tests that have really long numbers at v1.0.93
(and before). So if the invalid character '}' after top-level value
is fixed I can push that version. It won't generate new numbers until that is fixed due to the verification error.
from go-slog.
Thanks again! Let me try to continue my improvement.
from go-slog.
Please ignore my request now(don't update your benchmark code&resuslts). I gave up current approach and will totally rewrite phuslu/slog handler. thanks again!
from go-slog.
Hi @madkins23 , thank you for your help and guide before. Now phuslu/slog is ready for your review/test now(again 😄 )
Since my latest commit in phuslu/log@4daa79c
The go-slog verify/bench results look good currently
verify: https://github.com/phuslu/log/actions/runs/8934767267/job/24542167109
bench: https://github.com/phuslu/log/actions/runs/8934767267/job/24542166791
from go-slog.
thanks a lot, I will try to improve in later days then release a new version/tag -- But I supposed there will no significantly performance improvement, just code styles.
thanks again for make phuslu/slog become reality
from go-slog.
According benchmark in https://madkins23.github.io/go-slog/handler/PhusluSlog.html , Currently phuslu/slog still has two performance shortcomings: Disabled
and With Attrs Key Values
- I tried a tweak "Disabled" performance to match
phsym/zeroslog
score. - For
With Attrs Key Values
, I checked the code then found it's hard to to improve it because I have to check the empty here whilephsym/zeroslog
seems didn't.
from go-slog.
For StringAny
warnings, (If my understanding is correct), maybe I need change e.Any(a.Key, value.Any())
to e.Interface(a.Key, value.Any())
here:
https://github.com/phuslu/log/blob/fe42011085caece4d66b9b336b40e236cdaeafe5/slog.go#L55
from go-slog.
The StringAny
warning is unique to phuslu/slog
(the Usage
buttons on the warnings page shows which handlers throw each warning). I'm not sure how important it is (keep in mind, I just find these things, I'm not the authority on this stuff), but none of the other handlers seem to do it. On the other hand, it may never come up in normal usage. You might wish to look at the relevant code for other existing handlers.
from go-slog.
thanks for explanation, I added a commit on phuslu/log tip to fix StringAny
warnings
Historical reason is that phuslu/log Interface
function matches zerolog implementation.
from go-slog.
I believe the StringAny
warning is fixed and I released/tagged phuslu/log v1.0.94
I suppose that this is the "final version" of phuslu/slog, so I would appreciate it if you could update latest go-slog results based on phuslu/log v1.0.94.
from go-slog.
understood.
Currently I have a real case to demonstrate phuslu/log performance, thanks again.
from go-slog.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-slog.