-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance measurements #3490
Comments
Hi! Yes I think that's a good idea, bit more sure where exactly. PS: please be sure to use the lastest NLog version (can't find the versions for now in your article, on mobile), and please add them to the article :). Almost every NLog version has a performance improvement 😄 PS 2. Benchmark with Serilog would also be nice ;) |
Sounds like you mean |
Instead of configuring
|
The test-case for
The valid NLog test should be this (Instead of being a bad version of [Benchmark]
public object CreateNLogTypeOfLogger()
{
return new[]
{
NLog.LogManager.GetLogger(typeof(BaseTest).FullName), // x16 times
};
} And why the extra creation of array ? (Think |
@imanushin Regarding benchmarks then there is huge difference between:
There is also a huge difference between using GcServer or not. See my own tests here |
NLog with net472 running on Windows will actually perform "atomic" writes without using Mutex. Instead it will use NLog will use Mutex on non-Windows platforms when available, else it will fallback to opening/closing the file on each write. You can add the file-target parameter |
@snakefoot , @304NotModified , Thank you for feedback! I fixed typo with I used NLog version 2.6.3 (please see project here). I added them to article. Regarding to I agree with queue limit and batch sizes, I'll re-run tests with that parameters. I used Win x64, because it is faster version of executable, which can have both libraries in the single memory. This is honest (from my point of view), because the same application operates with the both libraries. I think I'll prepare NLog vs SeriLog comparison with also .Net Core/.Net Framework differences. And I'll fix article part, which describes Mutex operations. Also: I wrote Russian-language article too (just translation), I update it with small delay. |
I guess you mean NLog version 4.6.3 :) |
@snakefoot , yes, you are right. |
Added page: https://github.com/NLog/NLog/wiki/External-articles Could you please review there (and please rollback if I'm doing wrong)? |
Please use this page, instead of creating new:
https://github.com/nlog/NLog/wiki/Web-resources
Thanks
|
@snakefoot, done: I removed the new page, rolled back FAQ and updated the Web-resources. |
OK thanks, I assume this could be closed now :) |
@imanushin Could still be nice if you could fix this part of the article code: [Benchmark]
public object CreateLog4NetLogger()
{
return new []
{
LogManager.GetLogger(typeof(BaseTest)), // x16 times
};
}
[Benchmark]
public object CreateNLogTypeOfLogger()
{
return new[]
{
NLog.LogManager.GetCurrentClassLogger(typeof(BaseTest)), // x16 times
};
}
[Benchmark]
public object CreateNLogDynamicLogger()
{
return new[]
{
NLog.LogManager.GetCurrentClassLogger(), // x16 times
};
} Removing the
|
@snakefoot , yes, will remove and return to the thread. |
Hi Team!
I wrote short article regarding NLog (and log4net) performance (with benchmark comparison, etc.).
What do you think, is it reasonable to add article link into the NLog documentation?
Target text: https://medium.com/@imanushin/net-logging-performance-comparison-20c83aa84333
The text was updated successfully, but these errors were encountered: