mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
Move individual duration properties into a performanceData object (#36210)
This commit is contained in:
parent
f220e62ce7
commit
f99072593d
@ -237,10 +237,15 @@ namespace ts.server.protocol {
|
||||
*/
|
||||
metadata?: unknown;
|
||||
|
||||
/* @internal */
|
||||
performanceData?: PerformanceData;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export interface PerformanceData {
|
||||
/**
|
||||
* Time spent updating the program graph, in milliseconds.
|
||||
*/
|
||||
/* @internal */
|
||||
updateGraphDurationMs?: number;
|
||||
}
|
||||
|
||||
|
||||
@ -807,7 +807,11 @@ namespace ts.server {
|
||||
command: cmdName,
|
||||
request_seq: reqSeq,
|
||||
success,
|
||||
updateGraphDurationMs: this.updateGraphDurationMs,
|
||||
performanceData: !this.updateGraphDurationMs
|
||||
? undefined
|
||||
: {
|
||||
updateGraphDurationMs: this.updateGraphDurationMs,
|
||||
},
|
||||
};
|
||||
|
||||
if (success) {
|
||||
|
||||
@ -101,7 +101,7 @@ namespace ts.server {
|
||||
message: "Unrecognized JSON command: foobar",
|
||||
request_seq: 0,
|
||||
success: false,
|
||||
updateGraphDurationMs: undefined,
|
||||
performanceData: undefined,
|
||||
};
|
||||
expect(lastSent).to.deep.equal(expected);
|
||||
});
|
||||
@ -128,7 +128,7 @@ namespace ts.server {
|
||||
request_seq: 0,
|
||||
seq: 0,
|
||||
body: undefined,
|
||||
updateGraphDurationMs: undefined,
|
||||
performanceData: undefined,
|
||||
});
|
||||
});
|
||||
it("should handle literal types in request", () => {
|
||||
@ -329,7 +329,7 @@ namespace ts.server {
|
||||
request_seq: 0,
|
||||
seq: 0,
|
||||
body: undefined,
|
||||
updateGraphDurationMs: undefined,
|
||||
performanceData: undefined,
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -420,7 +420,7 @@ namespace ts.server {
|
||||
command,
|
||||
body,
|
||||
success: true,
|
||||
updateGraphDurationMs: undefined,
|
||||
performanceData: undefined,
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -540,7 +540,7 @@ namespace ts.server {
|
||||
command,
|
||||
body,
|
||||
success: true,
|
||||
updateGraphDurationMs: undefined,
|
||||
performanceData: undefined,
|
||||
});
|
||||
});
|
||||
it("can add and respond to new protocol handlers", () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user