Bug 143202 - Include cache entry worth to json dump
Summary: Include cache entry worth to json dump
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2015-03-29 17:00 PDT by Antti Koivisto
Modified: 2015-03-29 17:14 PDT (History)
1 user (show)

See Also:

patch (10.28 KB, patch)
2015-03-29 17:11 PDT, Antti Koivisto
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2015-03-29 17:00:59 PDT
Useful for analyzing cache performance.
Comment 1 Antti Koivisto 2015-03-29 17:11:23 PDT
Created attachment 249703 [details]
Comment 2 WebKit Commit Bot 2015-03-29 17:13:42 PDT
Attachment 249703 [details] did not pass style-queue:

ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:430:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h:75:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 2 in 6 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Darin Adler 2015-03-29 17:14:06 PDT
Comment on attachment 249703 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=249703&action=review

> Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.cpp:154
> +    json.append(String::format("\"bodySize\": %zu,\n", info.bodySize));
> +    json.append(String::format("\"worth\": %f,\n", info.worth));

I think it’s better to use appendNumber than String::format for putting numbers into a StringBuilder.