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
=== modified file 'src/service/main.cpp'
--- src/service/main.cpp 2015-09-29 14:05:53 +0000
+++ src/service/main.cpp 2015-10-15 04:37:08 +0000
@@ -40,7 +40,7 @@
40{40{
41 auto hits = stats.hits();41 auto hits = stats.hits();
42 auto misses = stats.misses();42 auto misses = stats.misses();
43 double hit_rate = (hits + misses == 0) ? 0.0 : hits / (hits + misses);43 double hit_rate = (hits + misses == 0) ? 0.0 : double(hits) / (hits + misses);
44 auto entries = stats.size();44 auto entries = stats.size();
45 auto size_in_bytes = stats.size_in_bytes();45 auto size_in_bytes = stats.size_in_bytes();
46 QString entry_str = entries == 1 ? QStringLiteral("entry") : QStringLiteral("entries");46 QString entry_str = entries == 1 ? QStringLiteral("entry") : QStringLiteral("entries");

Subscribers

People subscribed via source and target branches

to all changes: