[vcs-log] add baseline events to features and repository size statistic collectors

They are needed to count the total number of users with initialized log and calculate percentages from this number.

FUS-97, FUS-102
This commit is contained in:
Julia Beliaeva
2019-03-09 19:49:10 +03:00
parent 32077614c1
commit 8a4e82745d
2 changed files with 3 additions and 2 deletions
@@ -34,7 +34,8 @@ public class VcsLogFeaturesCollector extends ProjectUsagesCollector {
MainVcsLogUiProperties properties = ui.getProperties();
VcsLogUiProperties defaultProperties = createDefaultPropertiesInstance();
Set<UsageDescriptor> usages = ContainerUtil.newHashSet();
Set<UsageDescriptor> usages = ContainerUtil.newHashSet(new UsageDescriptor("uiInitialized"));
addBooleanUsage(properties, defaultProperties, usages, "details", CommonUiProperties.SHOW_DETAILS);
addBooleanUsage(properties, defaultProperties, usages, "diffPreview", CommonUiProperties.SHOW_DIFF_PREVIEW);
addBooleanUsage(properties, defaultProperties, usages, "parentChanges", SHOW_CHANGES_FROM_PARENTS);
@@ -38,7 +38,7 @@ public class VcsLogRepoSizeCollector extends ProjectUsagesCollector {
PermanentGraph<Integer> permanentGraph = dataPack.getPermanentGraph();
MultiMap<VcsKey, VirtualFile> groupedRoots = groupRootsByVcs(dataPack.getLogProviders());
Set<UsageDescriptor> usages = ContainerUtil.newHashSet();
Set<UsageDescriptor> usages = ContainerUtil.newHashSet(new UsageDescriptor("dataInitialized"));
usages.add(StatisticsUtilKt.getCountingUsage("commit.count", permanentGraph.getAllCommits().size(),
asList(0, 1, 100, 1000, 10 * 1000, 100 * 1000, 500 * 1000, 1000 * 1000)));
usages.add(StatisticsUtilKt.getCountingUsage("branches.count", dataPack.getRefsModel().getBranches().size(),