Interface StructureStatisticsRecorder
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatisticSource(StatisticSource source) Adds statistic source which is queried periodically for the statistic datavoidaddToIntValueDistrAsync(String statPrefix, int value, int... bins) Adds 1 to the statistics with the ID equal tostatPrefix.<bin>, wherebinis the least element of thebinsarray greater thanvalueor"inf"if all of the elements are less thanvalue.voidaddTotalCountAndActiveUserAsync(String feature) Adds 1 to use count forfeature(likeaddTotalCountAsync(String)) and adds the current user toactiveUser.<feature>(likeaddUniqueUserCountAsync(String)).voidaddTotalCountAsync(String feature) Counts that the specified feature was used.voidaddTotalCountAsync(String stat, double value) Adds the specified value to the specified statistic.voidaddUniqueUserCountAsync(String feature) Counts that the current logged-in user has used the specified feature.voidremoveStatisticSource(StatisticSource source) Removes statistic source which was previously registered
-
Method Details
-
addUniqueUserCountAsync
Counts that the current logged-in user has used the specified feature. The resulting statistic will be the average amount of unique feature users per day.You may also want to count the average total amount of feature usages per day via
addTotalCountAsync(String). Don't use the same feature ID for both total and unique user counts.The "async" part in the method name means that this object aggregates statistics and writes them to the backend in bulk.
-
addTotalCountAsync
Counts that the specified feature was used. The resulting statistic will be the average amount of times the feature is used per day.You may also want to count the average total amount of feature usages per day via
addUniqueUserCountAsync(String). Don't use the same feature ID for both total and unique user counts.The "async" part in the method name means that this object aggregates statistics and writes them to the backend in bulk.
-
addTotalCountAsync
Adds the specified value to the specified statistic. The resulting statistic will be the average sum of recorded values per day. This sum, or "count", is "total" in the sense that it does not account for the distribution of these values on users.The "async" part in the method name means that this object aggregates statistics and writes them to the backend in bulk.
-
addToIntValueDistrAsync
Adds 1 to the statistics with the ID equal tostatPrefix.<bin>, wherebinis the least element of thebinsarray greater thanvalueor"inf"if all of the elements are less thanvalue.In other words, if there are
nbinsb_0, ... b_{n-1}, this method adds 1 to one of then + 1statistics, which correspond to these intervals:statistic statPrefix.b_0 statPrefix.b_1 ... statPrefix.b_{n-1} statPrefix.inf interval (-\inf, b_0] (b_0 b_1] ... (b_{n-2} b_{n-1}] (b_{n-1}, \inf) The resulting statistics sharing
statPrefixcontain the distribution of the measured integer value over the specified bins, averaged per day.The "async" part in the method name means that this object aggregates statistics and writes them to the backend in bulk.
-
addStatisticSource
Adds statistic source which is queried periodically for the statistic data- Parameters:
source- source to register
-
removeStatisticSource
Removes statistic source which was previously registered- Parameters:
source- source to unregister
-
addTotalCountAndActiveUserAsync
Adds 1 to use count forfeature(likeaddTotalCountAsync(String)) and adds the current user toactiveUser.<feature>(likeaddUniqueUserCountAsync(String)).
-