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