mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
more metrics
This commit is contained in:
@@ -33,9 +33,12 @@ public class MetricsBean {
|
||||
thisHour.feedsRefreshed++;
|
||||
}
|
||||
|
||||
public void feedUpdated() {
|
||||
public void feedUpdated(int entriesCount) {
|
||||
thisHour.feedsRefreshed++;
|
||||
thisMinute.feedsUpdated++;
|
||||
|
||||
thisHour.entriesInserted += entriesCount;
|
||||
thisMinute.entriesInserted += entriesCount;
|
||||
}
|
||||
|
||||
public Metric getLastMinute() {
|
||||
@@ -49,6 +52,7 @@ public class MetricsBean {
|
||||
public static class Metric {
|
||||
private int feedsRefreshed;
|
||||
private int feedsUpdated;
|
||||
private int entriesInserted;
|
||||
|
||||
public int getFeedsRefreshed() {
|
||||
return feedsRefreshed;
|
||||
@@ -66,5 +70,13 @@ public class MetricsBean {
|
||||
this.feedsUpdated = feedsUpdated;
|
||||
}
|
||||
|
||||
public int getEntriesInserted() {
|
||||
return entriesInserted;
|
||||
}
|
||||
|
||||
public void setEntriesInserted(int entriesInserted) {
|
||||
this.entriesInserted = entriesInserted;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class FeedUpdateService {
|
||||
|
||||
feedEntryDAO.saveOrUpdate(entryUpdateList);
|
||||
feedEntryStatusDAO.saveOrUpdate(statusUpdateList);
|
||||
metricsBean.feedUpdated();
|
||||
metricsBean.feedUpdated(entryUpdateList.size());
|
||||
}
|
||||
|
||||
private FeedEntry findEntry(List<FeedEntry> existingEntries, FeedEntry entry) {
|
||||
|
||||
Reference in New Issue
Block a user