-
Notifications
You must be signed in to change notification settings - Fork 0
Benchmark of libmagic using a minimal magic file #8
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
base: develop
Are you sure you want to change the base?
Conversation
benchmarks/libmagic/README.md
Outdated
|
|
||
| ### Comparison | ||
|
|
||
| We focus here on the file `application-pdf.pdf` as it is detected by all compiled magic files. The results are similar in this scenario for the other files. There average time of the benchmarks for each magic file is: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Focus is a bit confusing I find as you show the results for many more mime-types. Maybe say that the comparison of the average time it takes to detect application/pdf is shown for the three different sizes of magic DBs.
|
|
||
| To assess the performance improvement gained by using a minimal magic file, we created the benchmark | ||
| `main.c`. This benchmark measures the time needed to find the MIME type of a file with | ||
| a given compiled magic file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention here already the 14.45% gain between full mime db and mime db covering only X mimetypes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also update the main README.md.
- Add a link to this section
- Mention the performance improvements of 14.45% in the first paragraph (as it basically shows the value of this project).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a hypothesis why we see an improvement of 14.45% here but a 30% performance improvement for overall squid performance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's worth to mention in the main README.md or by adding one to /benchmars/README.md what /e2e vs /libmagicvs /mod is about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a hypothesis why we see an improvement of 14.45% here but a 30% performance improvement for overall squid performance?
If you look at the results, they vary a lot, it would probably be better to do some kind of average difference rather than just one file.
| return sqrt(var(measures, length)); | ||
| } | ||
|
|
||
| int main(int argc, char *argv[]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool stuff, now you programmed some perl, bash, c and go to come!
No description provided.