Skip to content

Commit 4510773

Browse files
fflewddurhyangah
authored andcommitted
src/goSurvey: increase the prompt probability to 0.03
Change-Id: I4f15d6e8135407e2821de2a8f12b968deb8af0e4 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/320589 Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Trust: Hyang-Ah Hana Kim <[email protected]> Trust: Rebecca Stambler <[email protected]>
1 parent ad1dcce commit 4510773

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/goSurvey.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
'use strict';
88

99
import vscode = require('vscode');
10-
import { getLocalGoplsVersion, isInPreviewMode, lastUserAction, latestConfig } from './goLanguageServer';
10+
import { getLocalGoplsVersion, lastUserAction, latestConfig } from './goLanguageServer';
1111
import { outputChannel } from './goStatus';
1212
import { extensionId } from './const';
1313
import { getFromGlobalState, getFromWorkspaceState, updateGlobalState } from './stateUtils';
@@ -103,14 +103,12 @@ export function shouldPromptForSurvey(now: Date, cfg: SurveyConfig): SurveyConfi
103103
}
104104
// This is the first activation this month (or ever), so decide if we
105105
// should prompt the user. This is done by generating a random number in
106-
// the range [0, 1) and checking if it is < probability, which varies
107-
// depending on whether the default or the nightly is in use.
106+
// the range [0, 1) and checking if it is < probability.
108107
// We then randomly pick a day in the rest of the month on which to prompt
109108
// the user.
110-
let probability = 0.01; // lower probability for the regular extension
111-
if (isInPreviewMode()) {
112-
probability = 0.0275;
113-
}
109+
// Probability is set based on the # of responses received, and will be
110+
// decreased if we begin receiving > 200 responses/month.
111+
const probability = 0.03;
114112
cfg.promptThisMonth = Math.random() < probability;
115113
if (cfg.promptThisMonth) {
116114
// end is the last day of the month, day is the random day of the

0 commit comments

Comments
 (0)