November Happy Hour will be moved to Thursday December 5th.

Interface IPageStatistics

Defines signatures for page statistics component.

Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
public interface IPageStatistics
Examples
  How to fetch page statistics
  The following code example demonstrates how to use the built-in statistics properties.
            EPiServer.Core.IPageStatistics statisticsService = DataFactory.Instance;

// Pages
int pagesFromCache = statisticsService.PageFetchCacheHits;
int pagesFromDB = statisticsService.PageFetchDatabaseReads;
int totalPages = statisticsService.PageFetchCount;

double Ratio = Math.Round((double)pagesFromCache / (double)totalPages * 100, 2);

// Listings
int listingsFromCache = statisticsService.ListingFetchCacheHits;
int listingsFromDB = statisticsService.ListingFetchDatabaseReads;
int totalListings = statisticsService.ListingFetchCount;

double listingsRatio = Math.Round((double)listingsFromCache / (double)totalListings * 100, 2);

Properties

ListingFetchCacheHits

Total count of page children fetches on all PageProviders only for cached pages

Declaration
int ListingFetchCacheHits { get; }
Property Value
Type Description
System.Int32

ListingFetchCount

Total count of page children fetches on all PageProviders included cached pages

Declaration
int ListingFetchCount { get; }
Property Value
Type Description
System.Int32

ListingFetchDatabaseReads

Total count of page children fetches on all PageProviders without cached pages

Declaration
int ListingFetchDatabaseReads { get; }
Property Value
Type Description
System.Int32

PageFetchCacheHits

Total count of Page fetches on all PageProviders only for cached pages

Declaration
int PageFetchCacheHits { get; }
Property Value
Type Description
System.Int32

PageFetchCount

Total count of Page fetches on all PageProviders included cached pages

Declaration
int PageFetchCount { get; }
Property Value
Type Description
System.Int32

PageFetchDatabaseReads

Total count of Page fetches on all PageProviders without cached pages

Declaration
int PageFetchDatabaseReads { get; }
Property Value
Type Description
System.Int32

Methods

ResetCounters()

Resets all counters on all PageProviders

Declaration
void ResetCounters()

Extension Methods