Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX #16

Closed
wants to merge 56 commits into from
Closed

UX #16

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
9843dc0
initial nuxt UI integration
May 13, 2024
5478f52
type safe message passing
May 14, 2024
a574c25
added tailwind
May 14, 2024
ac0d8c7
send trace to UI
May 14, 2024
4b14e54
dev panel to enable testing without vscode
May 14, 2024
6741e70
restore tsconfig from main
May 14, 2024
24d0e3d
fix ci failures
May 15, 2024
a2193d8
ci fixes
May 15, 2024
4e26f52
build ui in test ci task
May 15, 2024
10e5072
added nuxt-ui
May 15, 2024
298058b
goto trace from source location
May 15, 2024
ae83c5e
add type counts to diagnostics
May 16, 2024
bfb6485
Merge branch 'main' into nuxt-ui
typeholes May 17, 2024
1fc11f1
Merge branch 'main' into nuxt-ui
typeholes May 17, 2024
e4486fa
fixed type count injection into diagnostics
typeholes May 17, 2024
9e494ed
Merge branch 'auto-trace' into nuxt-ui
typeholes May 17, 2024
73a3178
add options for statement level benchmarks, iteration count, and
typeholes May 18, 2024
04ab9e0
lint fixes
typeholes May 18, 2024
a048591
include non top level statement
typeholes May 18, 2024
6262ea4
Merge branch 'statement-level-benchmarks' into nuxt-ui
typeholes May 18, 2024
9531a43
chore: command to gather traces
typeholes May 19, 2024
f2bacf3
do not run benchmarks when iterations is 0
typeholes May 19, 2024
f68066e
restored newline to package.json (again)
typeholes May 19, 2024
54c5edd
feat: diagnostics from trace
typeholes May 19, 2024
392b564
Merge remote-tracking branch 'origin/main' into nuxt-ui
danielroe May 19, 2024
5f453b6
Merge branch 'main' into nuxt-ui
danielroe May 19, 2024
aa573a6
chore: build ui in `build` step
danielroe May 19, 2024
c458441
chore: remove quasar paths
danielroe May 19, 2024
746197e
chore: update deps
danielroe May 19, 2024
5d7733b
Merge branch 'main' into nuxt-ui
danielroe May 19, 2024
f245a7c
fix: activation failure and package failure
typeholes May 19, 2024
db14df2
Merge branch 'main' into generate-contributions
typeholes May 19, 2024
69d861f
fix: commands not showing
typeholes May 19, 2024
2e9832b
chore: fix vscode types dependency
typeholes May 19, 2024
52ea3dc
chore: update pnpm lock file
typeholes May 20, 2024
bffbc18
feat: send trace files in chunks, perf fixes
typeholes May 20, 2024
57bfb65
Merge branch 'main' into perf
typeholes May 20, 2024
f782fbb
removed traces from playground as they are no longer needed
typeholes May 20, 2024
dd00891
removed outdated package script
typeholes May 20, 2024
711f542
reset filters on process trace files
typeholes May 20, 2024
b433818
chore: vscode command contexts
typeholes May 20, 2024
357ffba
settings for thresholds
typeholes May 20, 2024
0b643d7
ability to inject markdown descriptions into config from .md files
typeholes May 20, 2024
217a6ac
trace diagnostics respect threshold settings
typeholes May 20, 2024
885affd
relative trace diagnostics
typeholes May 20, 2024
7816b02
ensure webview is open when running commands that interact with it
typeholes May 20, 2024
8b2e0bb
feedback during trace (WIP)
typeholes May 21, 2024
4cf963b
ui progress while trace running
typeholes May 21, 2024
f9941ed
ui progress while trace running
typeholes May 21, 2024
86a638c
Merge branch 'main' into UX
typeholes May 21, 2024
2af5894
removed js from playground
typeholes May 21, 2024
f85dc87
(WIP)
typeholes May 21, 2024
34d12c1
fix: bad performance with many types
typeholes May 21, 2024
adb12ca
fix: NaNs and negatives in trace diagnostics
typeholes May 21, 2024
48d2667
fix: error when reopening trace view
typeholes May 21, 2024
42fcd34
remove unused imports
typeholes May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion messages/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,28 @@ export const fileStats = z.object({
})
export type FileStats = z.infer<typeof fileStats>

export const traceStart = z.object({
message: z.literal('traceStart'),
})
export type TraceStart = z.infer<typeof traceStart>

export const traceStop = z.object({
message: z.literal('traceStop'),
})
export type TraceStop = z.infer<typeof traceStop>

export type Message = z.infer<typeof message>
export const message = z.union([ping, pong, gotoLocation, gotoPosition, traceFileChunk, traceFileEnd, traceFileStart, gotoTracePosition, positionTypeCounts, fileStats])
export const message = z.union([
ping,
pong,
gotoLocation,
gotoPosition,
traceFileChunk,
traceFileEnd,
traceFileStart,
gotoTracePosition,
positionTypeCounts,
fileStats,
traceStart,
traceStop,
])
229 changes: 208 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
],
"contributes": {
"configuration": {
"title": "tsperf.tracer",
"title": "TsPerf Tracer",
"properties": {
"tsperf.tracer.typescriptPathMode": {
"type": "string",
Expand All @@ -49,42 +49,212 @@
"VsCode TSDK setting",
"node_modules in you project",
"Use tracer TypeScript path setting"
]
],
"order": 0
},
"tsperf.tracer.traceCmd": {
"type": "string",
"default": "npx tsc --generateTrace ${traceDir}",
"description": "command to generate tsc traces"
"description": "command to generate tsc traces",
"order": 1
},
"tsperf.tracer.typescriptPath": {
"type": "string",
"default": "",
"description": "Path to TypeScript. Must be specified if 'Use TypeScript from' is 'Use tracer TypeScript path setting'"
"description": "Path to TypeScript. Must be specified if 'Use TypeScript from' is 'Use tracer TypeScript path setting'",
"order": 2
},
"tsperf.tracer.benchmarkIterations": {
"type": "number",
"default": 3,
"description": "Higher values reduce variance but increase benchmarking time"
"description": "Higher values reduce variance but increase benchmarking time",
"order": 3
},
"tsperf.tracer.restartTsserverOnIteration": {
"type": "boolean",
"default": false,
"description": "Restart tsserver on each iteration to avoid caching influincing measurements"
"description": "Restart tsserver on each iteration to avoid caching influincing measurements",
"order": 4
},
"tsperf.tracer.allIdentifiers": {
"type": "boolean",
"default": false,
"description": "Benchmark all allIdentifiers or only the first of each statement"
"description": "Benchmark all allIdentifiers or only the first of each statement",
"order": 5
},
"tsperf.tracer.traceTimeThresholds": {
"type": "object",
"properties": {
"info": {
"type": "number"
},
"warning": {
"type": "number"
},
"error": {
"type": "number"
}
},
"required": [
"info",
"warning",
"error"
],
"additionalProperties": false,
"default": {
"info": 1,
"warning": -1,
"error": -1
},
"description": "todo",
"order": 6,
"markdownDescription": "# Trace Time Thresholds\n\nTrigger diagnostics from trace files when check time in ms exceeds these thresholds.\n\n* -1 will disable diagnostics of that severity\n"
},
"tsperf.tracer.traceTypeThresholds": {
"type": "object",
"properties": {
"info": {
"type": "number"
},
"warning": {
"type": "number"
},
"error": {
"type": "number"
}
},
"required": [
"info",
"warning",
"error"
],
"additionalProperties": false,
"default": {
"info": 1,
"warning": -1,
"error": -1
},
"description": "todo",
"order": 7,
"markdownDescription": "# Trace Type Thresholds\n\nTrigger diagnostics from trace files when the number of types created locally in this check call exceeds these thresholds.\n\n* -1 will disable diagnostics of that severity\n"
},
"tsperf.tracer.traceTotalTypeThresholds": {
"type": "object",
"properties": {
"info": {
"type": "number"
},
"warning": {
"type": "number"
},
"error": {
"type": "number"
}
},
"required": [
"info",
"warning",
"error"
],
"additionalProperties": false,
"default": {
"info": 1,
"warning": -1,
"error": -1
},
"description": "todo",
"order": 8,
"markdownDescription": "# Trace Total Type Thresholds\n\nTrigger diagnostics from trace files when the number of types created in this check call stack exceeds these thresholds.\n\n* -1 will disable diagnostics of that severity\n"
},
"tsperf.tracer.traceDiagnosticsRelative": {
"type": "boolean",
"default": false,
"description": "Use measurements relative to the average for trace diagnostics",
"order": 9
},
"tsperf.tracer.traceTimeRelativeThresholds": {
"type": "object",
"properties": {
"info": {
"type": "number"
},
"warning": {
"type": "number"
},
"error": {
"type": "number"
}
},
"required": [
"info",
"warning",
"error"
],
"additionalProperties": false,
"default": {
"info": 1,
"warning": -1,
"error": -1
},
"description": "todo",
"order": 10
},
"tsperf.tracer.traceTypeRelativeThresholds": {
"type": "object",
"properties": {
"info": {
"type": "number"
},
"warning": {
"type": "number"
},
"error": {
"type": "number"
}
},
"required": [
"info",
"warning",
"error"
],
"additionalProperties": false,
"default": {
"info": 1,
"warning": -1,
"error": -1
},
"description": "todo",
"order": 11
},
"tsperf.tracer.traceTotalTypeRelativeThresholds": {
"type": "object",
"properties": {
"info": {
"type": "number"
},
"warning": {
"type": "number"
},
"error": {
"type": "number"
}
},
"required": [
"info",
"warning",
"error"
],
"additionalProperties": false,
"default": {
"info": 1,
"warning": -1,
"error": -1
},
"description": "todo",
"order": 12
}
}
},
"commandPalette": [
{
"command": "tsperf.tracer.sendTrace",
"when": "!notebookEditorFocused && editorLangId == 'json'",
"group": "tracer"
}
],
"commands": [
{
"command": "tsperf.tracer.gotoTracePosition",
Expand All @@ -93,29 +263,46 @@
},
{
"command": "tsperf.tracer.openInBrowser",
"title": "Open trace view in browser",
"category": "Tracer",
"title": "Open trace viewer",
"icon": {
"dark": "resources/todo.svg",
"light": "resources/todo.svg"
}
},
"category": "Tracer"
},
{
"command": "tsperf.tracer.runTrace",
"title": "tsc trace",
"category": "Tracer",
"icon": {
"dark": "resources/todo.svg",
"light": "resources/todo.svg"
}
},
"category": "Tracer"
},
{
"command": "tsperf.tracer.sendTrace",
"title": "Send Trace to Trace Viewer",
"when": "!notebookEditorFocused && editorLangId == 'json'",
"category": "Tracer"
}
]
],
"menus": {
"commandPalette": [
{
"command": "tsperf.tracer.sendTrace",
"title": "Send Trace to Trace Viewer",
"when": "!notebookEditorFocused && editorLangId == 'json'",
"category": "Tracer"
}
],
"explorer/context": [
{
"command": "tsperf.tracer.sendTrace",
"title": "Send Trace to Trace Viewer",
"when": "resourceFilename =~ /.*((trace)|(types)).*.json/",
"category": "Tracer"
}
]
}
},
"scripts": {
"generate:contributes": "jiti ./scripts/generate-contributes.ts",
Expand Down
21 changes: 0 additions & 21 deletions playground/index.js

This file was deleted.

5 changes: 5 additions & 0 deletions scripts/configDescriptions/traceTimeThresholds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Trace Time Thresholds

Trigger diagnostics from trace files when check time in ms exceeds these thresholds.

* -1 will disable diagnostics of that severity
5 changes: 5 additions & 0 deletions scripts/configDescriptions/traceTotalTypeThresholds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Trace Total Type Thresholds

Trigger diagnostics from trace files when the number of types created in this check call stack exceeds these thresholds.

* -1 will disable diagnostics of that severity
5 changes: 5 additions & 0 deletions scripts/configDescriptions/traceTypeThresholds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Trace Type Thresholds

Trigger diagnostics from trace files when the number of types created locally in this check call exceeds these thresholds.

* -1 will disable diagnostics of that severity
Loading
Loading