Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8aa43071
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8aa43071
编写于
8月 18, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add vsix download telemetry timer data
related to #10180
上级
231bad3f
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
37 addition
and
16 deletion
+37
-16
src/vs/platform/extensionManagement/common/extensionTelemetry.ts
...platform/extensionManagement/common/extensionTelemetry.ts
+30
-0
src/vs/platform/extensionManagement/node/extensionGalleryService.ts
...tform/extensionManagement/node/extensionGalleryService.ts
+4
-0
src/vs/workbench/parts/extensions/electron-browser/extensionsWorkbenchService.ts
...extensions/electron-browser/extensionsWorkbenchService.ts
+3
-16
未找到文件。
src/vs/platform/extensionManagement/common/extensionTelemetry.ts
0 → 100644
浏览文件 @
8aa43071
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
ILocalExtension
,
IGalleryExtension
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
export
function
getLocalExtensionTelemetryData
(
extension
:
ILocalExtension
):
any
{
return
{
id
:
`
${
extension
.
manifest
.
publisher
}
.
${
extension
.
manifest
.
name
}
`
,
name
:
extension
.
manifest
.
name
,
galleryId
:
extension
.
metadata
?
extension
.
metadata
.
id
:
null
,
publisherId
:
extension
.
metadata
?
extension
.
metadata
.
publisherId
:
null
,
publisherName
:
extension
.
manifest
.
publisher
,
publisherDisplayName
:
extension
.
metadata
?
extension
.
metadata
.
publisherDisplayName
:
null
};
}
export
function
getGalleryExtensionTelemetryData
(
extension
:
IGalleryExtension
):
any
{
return
{
id
:
`
${
extension
.
publisher
}
.
${
extension
.
name
}
`
,
name
:
extension
.
name
,
galleryId
:
extension
.
id
,
publisherId
:
extension
.
publisherId
,
publisherName
:
extension
.
publisher
,
publisherDisplayName
:
extension
.
publisherDisplayName
};
}
\ No newline at end of file
src/vs/platform/extensionManagement/node/extensionGalleryService.ts
浏览文件 @
8aa43071
...
...
@@ -8,6 +8,7 @@ import { tmpdir } from 'os';
import
*
as
path
from
'
path
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IGalleryExtension
,
IExtensionGalleryService
,
IQueryOptions
,
SortBy
,
SortOrder
,
IExtensionManifest
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
import
{
getGalleryExtensionTelemetryData
}
from
'
vs/platform/extensionManagement/common/extensionTelemetry
'
;
import
{
isUndefined
}
from
'
vs/base/common/types
'
;
import
{
assign
,
getOrDefault
}
from
'
vs/base/common/objects
'
;
import
{
IRequestService
}
from
'
vs/platform/request/common/request
'
;
...
...
@@ -339,10 +340,13 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
return
this
.
getLastValidExtensionVersion
(
rawExtension
,
rawExtension
.
versions
).
then
(
rawVersion
=>
{
const
url
=
`
${
getAssetSource
(
rawVersion
.
files
,
AssetType
.
VSIX
)
}
?install=true`
;
const
zipPath
=
path
.
join
(
tmpdir
(),
extension
.
id
);
const
data
=
getGalleryExtensionTelemetryData
(
extension
);
const
timer
=
this
.
telemetryService
.
timedPublicLog
(
'
galleryService:downloadVSIX
'
,
data
);
return
this
.
getCommonHeaders
()
.
then
(
headers
=>
this
.
_getAsset
({
url
,
headers
}))
.
then
(
context
=>
download
(
zipPath
,
context
))
.
then
(()
=>
timer
.
stop
())
.
then
(()
=>
zipPath
);
});
});
...
...
src/vs/workbench/parts/extensions/electron-browser/extensionsWorkbenchService.ts
浏览文件 @
8aa43071
...
...
@@ -15,6 +15,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import
{
IPager
,
mapPager
,
singlePagePager
}
from
'
vs/base/common/paging
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IExtensionManagementService
,
IExtensionGalleryService
,
IExtensionTipsService
,
ILocalExtension
,
IGalleryExtension
,
IQueryOptions
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
import
{
getGalleryExtensionTelemetryData
,
getLocalExtensionTelemetryData
}
from
'
vs/platform/extensionManagement/common/extensionTelemetry
'
;
import
*
as
semver
from
'
semver
'
;
import
*
as
path
from
'
path
'
;
import
URI
from
'
vs/base/common/uri
'
;
...
...
@@ -120,23 +121,9 @@ class Extension implements IExtension {
const
{
local
,
gallery
}
=
this
;
if
(
gallery
)
{
return
{
id
:
`
${
gallery
.
publisher
}
.
${
gallery
.
name
}
`
,
name
:
gallery
.
name
,
galleryId
:
gallery
.
id
,
publisherId
:
gallery
.
publisherId
,
publisherName
:
gallery
.
publisher
,
publisherDisplayName
:
gallery
.
publisherDisplayName
};
return
getGalleryExtensionTelemetryData
(
gallery
);
}
else
{
return
{
id
:
`
${
local
.
manifest
.
publisher
}
.
${
local
.
manifest
.
name
}
`
,
name
:
local
.
manifest
.
name
,
galleryId
:
local
.
metadata
?
local
.
metadata
.
id
:
null
,
publisherId
:
local
.
metadata
?
local
.
metadata
.
publisherId
:
null
,
publisherName
:
local
.
manifest
.
publisher
,
publisherDisplayName
:
local
.
metadata
?
local
.
metadata
.
publisherDisplayName
:
null
};
return
getLocalExtensionTelemetryData
(
local
);
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录