Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d9e7a2e2
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,发现更多精彩内容 >>
提交
d9e7a2e2
编写于
5月 18, 2017
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
configure .eslintrc to use ecma script 3 for things in src
上级
77b9cbe7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
19 deletion
+24
-19
src/.eslintrc
src/.eslintrc
+5
-2
src/vs/base/node/startupTimers.js
src/vs/base/node/startupTimers.js
+19
-17
未找到文件。
src/.eslintrc
浏览文件 @
d9e7a2e2
{
"parserOptions": {
"ecmaVersion": 3
},
"env": {
"node": true,
"es6":
fals
e
"es6":
tru
e
},
"rules": {
"no-console": 0,
...
...
@@ -11,4 +14,4 @@
"semi": "warn"
},
"extends": "eslint:recommended"
}
\ No newline at end of file
}
src/vs/base/node/startupTimers.js
浏览文件 @
d9e7a2e2
...
...
@@ -5,6 +5,8 @@
'
use strict
'
;
/*global define*/
var
requireProfiler
;
if
(
typeof
define
!==
"
function
"
&&
typeof
module
===
"
object
"
&&
typeof
module
.
exports
===
"
object
"
)
{
...
...
@@ -12,23 +14,23 @@ if (typeof define !== "function" && typeof module === "object" && typeof module.
global
.
define
=
function
(
dep
,
callback
)
{
module
.
exports
=
callback
();
global
.
define
=
undefined
;
}
}
;
requireProfiler
=
function
()
{
return
require
(
'
v8-profiler
'
);
}
}
;
}
else
{
// this is amd
requireProfiler
=
function
()
{
return
require
.
__$__nodeRequire
(
'
v8-profiler
'
);
}
}
;
}
define
([],
function
()
{
function
Tick
(
name
,
started
,
stopped
,
profile
)
{
this
.
name
=
name
this
.
started
=
started
this
.
stopped
=
stopped
this
.
name
=
name
;
this
.
started
=
started
;
this
.
stopped
=
stopped
;
this
.
duration
=
stopped
-
started
;
this
.
profile
=
profile
;
}
...
...
@@ -49,9 +51,9 @@ define([], function () {
global
.
_perfTicks
=
global
.
_perfTicks
||
[];
global
.
_perfToBeProfiled
=
global
.
_perfToBeProfiled
||
new
Set
();
const
_starts
=
global
.
_perfStarts
;
const
_ticks
=
global
.
_perfTicks
;
const
_toBeProfiled
=
global
.
_perfToBeProfiled
var
_starts
=
global
.
_perfStarts
;
var
_ticks
=
global
.
_perfTicks
;
var
_toBeProfiled
=
global
.
_perfToBeProfiled
;
function
startTimer
(
name
,
started
)
{
if
(
typeof
started
!==
'
number
'
)
{
...
...
@@ -64,7 +66,7 @@ define([], function () {
requireProfiler
().
startProfiling
(
name
,
true
);
}
_starts
.
set
(
name
,
{
name
:
name
,
started
:
started
});
const
stop
=
stopTimer
.
bind
(
undefined
,
name
);
var
stop
=
stopTimer
.
bind
(
undefined
,
name
);
return
{
stop
:
stop
,
while
:
function
(
thenable
)
{
...
...
@@ -78,9 +80,9 @@ define([], function () {
if
(
typeof
stopped
!==
'
number
'
)
{
stopped
=
Date
.
now
();
}
const
profile
=
_toBeProfiled
.
has
(
name
)
?
requireProfiler
().
stopProfiling
(
name
)
:
undefined
;
const
start
=
_starts
.
get
(
name
);
const
tick
=
new
Tick
(
start
.
name
,
start
.
started
,
stopped
,
profile
);
var
profile
=
_toBeProfiled
.
has
(
name
)
?
requireProfiler
().
stopProfiling
(
name
)
:
undefined
;
var
start
=
_starts
.
get
(
name
);
var
tick
=
new
Tick
(
start
.
name
,
start
.
started
,
stopped
,
profile
);
_ticks
.
push
(
tick
);
_starts
.
delete
(
name
);
}
...
...
@@ -91,10 +93,10 @@ define([], function () {
function
setProfileList
(
names
)
{
_toBeProfiled
.
clear
();
names
.
forEach
(
function
(
name
)
{
_toBeProfiled
.
add
(
name
)
});
names
.
forEach
(
function
(
name
)
{
_toBeProfiled
.
add
(
name
)
;
});
}
const
exports
=
{
var
exports
=
{
Tick
:
Tick
,
startTimer
:
startTimer
,
stopTimer
:
stopTimer
,
...
...
@@ -104,8 +106,8 @@ define([], function () {
};
function
disable
()
{
const
emptyController
=
Object
.
freeze
({
while
:
function
(
t
)
{
return
t
;
},
stop
:
function
()
{
}
});
const
emptyTicks
=
Object
.
create
([]);
var
emptyController
=
Object
.
freeze
({
while
:
function
(
t
)
{
return
t
;
},
stop
:
function
()
{
}
});
var
emptyTicks
=
Object
.
create
([]);
exports
.
startTimer
=
function
()
{
return
emptyController
;
};
exports
.
stopTimer
=
function
()
{
};
exports
.
ticks
=
function
()
{
return
emptyTicks
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录