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