提交 fa4660cf 编写于 作者: J Johannes Rieken 提交者: GitHub

debt - remove unused suggest widget telemetry

上级 6f8515fa
......@@ -14,20 +14,8 @@ import { MovingAverage } from 'vs/base/common/numbers';
type StrictCompletionItem = Required<CompletionItem>;
/* __GDPR__FRAGMENT__
"ICompletionStats" : {
"suggestionCount" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
"snippetCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
"textCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
}
*/
// __GDPR__TODO__: This is a dynamically extensible structure which can not be declared statically.
export interface ICompletionStats {
suggestionCount: number;
snippetCount: number;
textCount: number;
avgLabelLen: MovingAverage;
[name: string]: any;
}
export class LineContext {
......@@ -149,7 +137,7 @@ export class CompletionModel {
private _createCachedState(): void {
this._providerInfo = new Map();
this._stats = { suggestionCount: 0, snippetCount: 0, textCount: 0, avgLabelLen: new MovingAverage() };
this._stats = { avgLabelLen: new MovingAverage() };
const { leadingLineContent, characterCountDelta } = this._lineContext;
let word = '';
......@@ -252,11 +240,6 @@ export class CompletionModel {
// update stats
this._stats.avgLabelLen.update(textLabel.length);
this._stats.suggestionCount++;
switch (item.completion.kind) {
case CompletionItemKind.Snippet: this._stats.snippetCount++; break;
case CompletionItemKind.Text: this._stats.textCount++; break;
}
}
this._filteredItems = target.sort(this._snippetCompareFn);
......
......@@ -137,7 +137,6 @@ export class SuggestWidget implements IDisposable {
constructor(
private readonly editor: ICodeEditor,
@ITelemetryService private readonly _telemetryService: ITelemetryService,
@IStorageService private readonly _storageService: IStorageService,
@IContextKeyService _contextKeyService: IContextKeyService,
@IThemeService _themeService: IThemeService,
......@@ -518,20 +517,6 @@ export class SuggestWidget implements IDisposable {
return;
}
if (this.state !== State.Open) {
const { stats } = this.completionModel;
stats['wasAutomaticallyTriggered'] = !!isAuto;
/* __GDPR__
"suggestWidget" : {
"wasAutomaticallyTriggered" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true },
"${include}": [
"${ICompletionStats}"
]
}
*/
this._telemetryService.publicLog('suggestWidget', { ...stats });
}
this.focusedItem = undefined;
this.list.splice(0, this.list.length, this.completionModel.items);
this._setState(isFrozen ? State.Frozen : State.Open);
......@@ -657,7 +642,6 @@ export class SuggestWidget implements IDisposable {
this._details.widget.domNode.style.borderColor = this.detailsFocusBorderColor;
}
}
this._telemetryService.publicLog2('suggestWidget:toggleDetailsFocus');
}
toggleDetails(): void {
......@@ -667,14 +651,12 @@ export class SuggestWidget implements IDisposable {
this._setDetailsVisible(false);
this._details.hide();
this.element.domNode.classList.remove('shows-details');
this._telemetryService.publicLog2('suggestWidget:collapseDetails');
} else if (canExpandCompletionItem(this.list.getFocusedElements()[0]) && (this.state === State.Open || this.state === State.Details || this.state === State.Frozen)) {
// show details widget (iff possible)
this.ctxSuggestWidgetDetailsVisible.set(true);
this._setDetailsVisible(true);
this.showDetails(false);
this._telemetryService.publicLog2('suggestWidget:expandDetails');
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册