-
- All Implemented Interfaces:
-
ai.platon.pulsar.common.config.Parameterized,java.lang.AutoCloseable
public final class CoreMetrics implements Parameterized, AutoCloseable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCoreMetrics.Companion
-
Field Summary
Fields Modifier and Type Field Description private final URLUtil.GroupModegroupModeprivate final IntegermaxHostFailureEventsprivate final InstantstartTimeprivate final DurationelapsedTimeprivate final ConcurrentHashMap<String, UrlStat>urlStatisticsprivate final ConcurrentSkipListSet<String>unreachableHostsprivate final ConcurrentSkipListSet<String>timeoutUrlsprivate final ConcurrentSkipListSet<String>movedUrlsprivate final ConcurrentSkipListSet<String>failedUrlsprivate final ConcurrentSkipListSet<String>deadUrlsprivate final ConcurrentHashMultiset<String>failedHostsprivate final MetermeterTotalNetworkIFsRecvMBytesprivate final Metertasksprivate final MetersuccessTasksprivate final MeterfinishedTasksprivate final MultiMetricpersistsprivate final MultiMetriccontentPersistsprivate final MultiMetricmeterContentMBytesprivate final MultiMetricpersistContentMBytesprivate final MetermeterContentBytesprivate final HistogramhistogramContentBytesprivate final HistogrampageImagesprivate final HistogrampageAnchorsprivate final HistogrampageNumbersprivate final HistogrampageSmallTextsprivate final HistogrampageHeightsprivate final <ERROR CLASS>realTimeNetworkIFsRecvBytesprivate final <ERROR CLASS>initNetworkIFsRecvBytesprivate volatile LongtotalNetworkIFsRecvBytesprivate final <ERROR CLASS>networkIFsRecvBytesprivate final <ERROR CLASS>networkIFsRecvBytesPerSecondprivate final <ERROR CLASS>networkIFsRecvBytesPerPageprivate final <ERROR CLASS>finishedTasksPerSecondprivate final <ERROR CLASS>successTasksPerSecond
-
Constructor Summary
Constructors Constructor Description CoreMetrics(MiscMessageWriter messageWriter, ImmutableConfig conf)
-
Method Summary
-
-
Constructor Detail
-
CoreMetrics
CoreMetrics(MiscMessageWriter messageWriter, ImmutableConfig conf)
-
-
Method Detail
-
getGroupMode
final URLUtil.GroupMode getGroupMode()
-
getMaxHostFailureEvents
final Integer getMaxHostFailureEvents()
-
getStartTime
final Instant getStartTime()
-
getElapsedTime
final Duration getElapsedTime()
-
getUrlStatistics
final ConcurrentHashMap<String, UrlStat> getUrlStatistics()
Tracking statistics for each host
-
getUnreachableHosts
final ConcurrentSkipListSet<String> getUnreachableHosts()
Tracking unreachable hosts
-
getTimeoutUrls
final ConcurrentSkipListSet<String> getTimeoutUrls()
Tracking hosts who is failed to fetch tasks. A host is considered to be a unreachable host if there are too many failure
-
getMovedUrls
final ConcurrentSkipListSet<String> getMovedUrls()
-
getFailedUrls
final ConcurrentSkipListSet<String> getFailedUrls()
-
getDeadUrls
final ConcurrentSkipListSet<String> getDeadUrls()
-
getFailedHosts
final ConcurrentHashMultiset<String> getFailedHosts()
-
getMeterTotalNetworkIFsRecvMBytes
final Meter getMeterTotalNetworkIFsRecvMBytes()
-
getTasks
final Meter getTasks()
The total bytes of page content of all success web pages
-
getSuccessTasks
final Meter getSuccessTasks()
-
getFinishedTasks
final Meter getFinishedTasks()
-
getPersists
final MultiMetric getPersists()
-
getContentPersists
final MultiMetric getContentPersists()
-
getMeterContentMBytes
final MultiMetric getMeterContentMBytes()
-
getPersistContentMBytes
final MultiMetric getPersistContentMBytes()
-
getMeterContentBytes
final Meter getMeterContentBytes()
-
getHistogramContentBytes
final Histogram getHistogramContentBytes()
-
getPageImages
final Histogram getPageImages()
-
getPageAnchors
final Histogram getPageAnchors()
-
getPageNumbers
final Histogram getPageNumbers()
-
getPageSmallTexts
final Histogram getPageSmallTexts()
-
getPageHeights
final Histogram getPageHeights()
-
getRealTimeNetworkIFsRecvBytes
final <ERROR CLASS> getRealTimeNetworkIFsRecvBytes()
-
getInitNetworkIFsRecvBytes
final <ERROR CLASS> getInitNetworkIFsRecvBytes()
The total all bytes received by the hardware at the application startup
-
getTotalNetworkIFsRecvBytes
final Long getTotalNetworkIFsRecvBytes()
The total all bytes received by the hardware last read from system
-
setTotalNetworkIFsRecvBytes
final Unit setTotalNetworkIFsRecvBytes(Long totalNetworkIFsRecvBytes)
The total all bytes received by the hardware last read from system
-
getNetworkIFsRecvBytes
final <ERROR CLASS> getNetworkIFsRecvBytes()
-
getNetworkIFsRecvBytesPerSecond
final <ERROR CLASS> getNetworkIFsRecvBytesPerSecond()
-
getNetworkIFsRecvBytesPerPage
final <ERROR CLASS> getNetworkIFsRecvBytesPerPage()
-
getFinishedTasksPerSecond
final <ERROR CLASS> getFinishedTasksPerSecond()
-
getSuccessTasksPerSecond
final <ERROR CLASS> getSuccessTasksPerSecond()
-
getParams
Params getParams()
-
isReachable
final Boolean isReachable(String url)
-
isUnreachable
final Boolean isUnreachable(String url)
-
trackFailedUrl
final Unit trackFailedUrl(String url)
-
trackFailedUrls
final Unit trackFailedUrls(Collection<String> urls)
-
markTaskStart
final Unit markTaskStart()
-
markTaskStart
final Unit markTaskStart(Integer size)
-
trackSuccess
final Unit trackSuccess(WebPage page)
Available hosts statistics
-
trackTimeout
final Unit trackTimeout(String url)
-
trackMoved
final Unit trackMoved(String url)
-
trackHostUnreachable
final Boolean trackHostUnreachable(String url, Integer occurrences)
- Parameters:
url- The url
-
countHostTasks
final Integer countHostTasks(String host)
-
formatStatus
final String formatStatus()
-
updateSystemInfo
final Unit updateSystemInfo()
-
-
-
-