Merge lp:~michihenning/thumbnailer/fix-hit-rate into lp:thumbnailer/devel

Proposed by Michi Henning
Status: Merged
Approved by: James Henstridge
Approved revision: 288
Merged at revision: 288
Proposed branch: lp:~michihenning/thumbnailer/fix-hit-rate
Merge into: lp:thumbnailer/devel
Diff against target: 12 lines (+1/-1)
1 file modified
src/service/main.cpp (+1/-1)
To merge this branch: bzr merge lp:~michihenning/thumbnailer/fix-hit-rate
Reviewer Review Type Date Requested Status
James Henstridge Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+274507@code.launchpad.net

Commit message

Fixed incorrect hit rate reported on service start-up.

Description of the change

Fixed incorrect hit rate reported on service start-up.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/service/main.cpp'
2--- src/service/main.cpp 2015-09-29 14:05:53 +0000
3+++ src/service/main.cpp 2015-10-15 04:37:08 +0000
4@@ -40,7 +40,7 @@
5 {
6 auto hits = stats.hits();
7 auto misses = stats.misses();
8- double hit_rate = (hits + misses == 0) ? 0.0 : hits / (hits + misses);
9+ double hit_rate = (hits + misses == 0) ? 0.0 : double(hits) / (hits + misses);
10 auto entries = stats.size();
11 auto size_in_bytes = stats.size_in_bytes();
12 QString entry_str = entries == 1 ? QStringLiteral("entry") : QStringLiteral("entries");

Subscribers

People subscribed via source and target branches

to all changes: