forked from Archives/Athou_commafeed
more metrics
This commit is contained in:
@@ -33,12 +33,15 @@ public class MetricsBean {
|
||||
thisHour.feedsRefreshed++;
|
||||
}
|
||||
|
||||
public void feedUpdated(int entriesCount) {
|
||||
public void feedUpdated(int entriesCount, int statusesCount) {
|
||||
thisHour.feedsUpdated++;
|
||||
thisMinute.feedsUpdated++;
|
||||
|
||||
thisHour.entriesInserted += entriesCount;
|
||||
thisMinute.entriesInserted += entriesCount;
|
||||
|
||||
thisHour.statusesInserted += statusesCount;
|
||||
thisMinute.statusesInserted += statusesCount;
|
||||
}
|
||||
|
||||
public Metric getLastMinute() {
|
||||
@@ -53,6 +56,7 @@ public class MetricsBean {
|
||||
private int feedsRefreshed;
|
||||
private int feedsUpdated;
|
||||
private int entriesInserted;
|
||||
private int statusesInserted;
|
||||
|
||||
public int getFeedsRefreshed() {
|
||||
return feedsRefreshed;
|
||||
@@ -78,5 +82,13 @@ public class MetricsBean {
|
||||
this.entriesInserted = entriesInserted;
|
||||
}
|
||||
|
||||
public int getStatusesInserted() {
|
||||
return statusesInserted;
|
||||
}
|
||||
|
||||
public void setStatusesInserted(int statusesInserted) {
|
||||
this.statusesInserted = statusesInserted;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,8 @@ public class FeedUpdateService {
|
||||
|
||||
feedEntryDAO.saveOrUpdate(entryUpdateList);
|
||||
feedEntryStatusDAO.saveOrUpdate(statusUpdateList);
|
||||
metricsBean.feedUpdated(entryUpdateList.size());
|
||||
metricsBean
|
||||
.feedUpdated(entryUpdateList.size(), statusUpdateList.size());
|
||||
}
|
||||
|
||||
private FeedEntry findEntry(List<FeedEntry> existingEntries, FeedEntry entry) {
|
||||
|
||||
Reference in New Issue
Block a user