Bug 143202

Summary: Include cache entry worth to json dump
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch darin: review+

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]
patch
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]
patch

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.