Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/Source/core/fetch/MemoryCache.cpp

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More build fixes Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 { 739 {
740 MemoryCacheEntry* ex = getEntryForResource(x); 740 MemoryCacheEntry* ex = getEntryForResource(x);
741 MemoryCacheEntry* ey = getEntryForResource(y); 741 MemoryCacheEntry* ey = getEntryForResource(y);
742 ASSERT(ex); 742 ASSERT(ex);
743 ASSERT(ey); 743 ASSERT(ey);
744 return lruListFor(ex->m_accessCount, x->size()) == lruListFor(ey->m_accessCo unt, y->size()); 744 return lruListFor(ex->m_accessCount, x->size()) == lruListFor(ey->m_accessCo unt, y->size());
745 } 745 }
746 746
747 #ifdef MEMORY_CACHE_STATS 747 #ifdef MEMORY_CACHE_STATS
748 748
749 void MemoryCache::dumpStats(Timer<MemoryCache>*) 749 void MemoryCache::dumpStats(TimerBase*)
750 { 750 {
751 Statistics s = getStatistics(); 751 Statistics s = getStatistics();
752 printf("%-13s %-13s %-13s %-13s %-13s %-13s %-13s\n", "", "Count", "Size", " LiveSize", "DecodedSize", "PurgeableSize", "PurgedSize"); 752 printf("%-13s %-13s %-13s %-13s %-13s %-13s %-13s\n", "", "Count", "Size", " LiveSize", "DecodedSize", "PurgeableSize", "PurgedSize");
753 printf("%-13s %-13s %-13s %-13s %-13s %-13s %-13s\n", "-------------", "---- ---------", "-------------", "-------------", "-------------", "-------------", "-------------"); 753 printf("%-13s %-13s %-13s %-13s %-13s %-13s %-13s\n", "-------------", "---- ---------", "-------------", "-------------", "-------------", "-------------", "-------------");
754 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "Images", s.images.count, s. images.size, s.images.liveSize, s.images.decodedSize, s.images.purgeableSize, s. images.purgedSize); 754 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "Images", s.images.count, s. images.size, s.images.liveSize, s.images.decodedSize, s.images.purgeableSize, s. images.purgedSize);
755 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "CSS", s.cssStyleSheets.coun t, s.cssStyleSheets.size, s.cssStyleSheets.liveSize, s.cssStyleSheets.decodedSiz e, s.cssStyleSheets.purgeableSize, s.cssStyleSheets.purgedSize); 755 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "CSS", s.cssStyleSheets.coun t, s.cssStyleSheets.size, s.cssStyleSheets.liveSize, s.cssStyleSheets.decodedSiz e, s.cssStyleSheets.purgeableSize, s.cssStyleSheets.purgedSize);
756 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "XSL", s.xslStyleSheets.coun t, s.xslStyleSheets.size, s.xslStyleSheets.liveSize, s.xslStyleSheets.decodedSiz e, s.xslStyleSheets.purgeableSize, s.xslStyleSheets.purgedSize); 756 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "XSL", s.xslStyleSheets.coun t, s.xslStyleSheets.size, s.xslStyleSheets.liveSize, s.xslStyleSheets.decodedSiz e, s.xslStyleSheets.purgeableSize, s.xslStyleSheets.purgedSize);
757 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "JavaScript", s.scripts.coun t, s.scripts.size, s.scripts.liveSize, s.scripts.decodedSize, s.scripts.purgeabl eSize, s.scripts.purgedSize); 757 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "JavaScript", s.scripts.coun t, s.scripts.size, s.scripts.liveSize, s.scripts.decodedSize, s.scripts.purgeabl eSize, s.scripts.purgedSize);
758 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "Fonts", s.fonts.count, s.fo nts.size, s.fonts.liveSize, s.fonts.decodedSize, s.fonts.purgeableSize, s.fonts. purgedSize); 758 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "Fonts", s.fonts.count, s.fo nts.size, s.fonts.liveSize, s.fonts.decodedSize, s.fonts.purgeableSize, s.fonts. purgedSize);
759 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "Other", s.other.count, s.ot her.size, s.other.liveSize, s.other.decodedSize, s.other.purgeableSize, s.other. purgedSize); 759 printf("%-13s %13d %13d %13d %13d %13d %13d\n", "Other", s.other.count, s.ot her.size, s.other.liveSize, s.other.decodedSize, s.other.purgeableSize, s.other. purgedSize);
(...skipping 22 matching lines...) Expand all
782 printf("(%.1fK, %.1fK, %uA, %dR, %d); ", currentResource->decode dSize() / 1024.0f, (currentResource->encodedSize() + currentResource->overheadSi ze()) / 1024.0f, current->m_accessCount, currentResource->hasClientsOrObservers( ), currentResource->isPurgeable()); 782 printf("(%.1fK, %.1fK, %uA, %dR, %d); ", currentResource->decode dSize() / 1024.0f, (currentResource->encodedSize() + currentResource->overheadSi ze()) / 1024.0f, current->m_accessCount, currentResource->hasClientsOrObservers( ), currentResource->isPurgeable());
783 783
784 current = current->m_previousInAllResourcesList; 784 current = current->m_previousInAllResourcesList;
785 } 785 }
786 } 786 }
787 } 787 }
788 788
789 #endif // MEMORY_CACHE_STATS 789 #endif // MEMORY_CACHE_STATS
790 790
791 } // namespace blink 791 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MemoryCache.h ('k') | third_party/WebKit/Source/core/fetch/RawResourceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698