Nadro/3799/perf (#4145)
* chore: building out perf testing * chore: adding my printing code for the different formats of the marks * feat: adding invocation count table * fix: markOnce iunstead * fix: typescript additions * fix: adding more types * chore: adding telemetry panel as MVP, gonna remove the pane * chore: view telemetry from command bar in file route and home route * fix: deleting unused imports * fix: deleting some unused files * fix: auto cleanup * chore: adding other routes, these will need to be moved... * chore: moving some printing logic around and unit testing some of it * fix: moving command init * fix: removing debugging marks * fix: adding some comments * fix: fixed a bug with generating the go to page commands * chore: adding will pages load within the router config * chore: implementing marks for routes * fix: auto fixes and checkers * chore: implemented a route watcher at the root level... * fix: auto fixes, removing unused code * chore: timing for syntax highlighting and auto fixes * fix: didAuth issue and syntax highlighting in the packaged application. Constructor name gets renamed * fix: fixing typescript checks * chore: adding mag bar chart icon for telemetry * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * chore: swapped telemetry icon for stopwatch * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * chore: writing telemetry to disk * fix: auto fixers * chore: getting args parsed for cli flags and writing telemetry file * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * chore: swapped mark for markOnce since we infinitely write marks to a JS array... need to solve this run time marking in another way. We only need this for startup right now * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * chore: writing raw marks to disk as well * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest) * fix: cleaned up the testing names * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * Fix fmt and codespell * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores) * fix: moving this route loader data stuff * chore: adding comment * fix: fmt * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * empty :( * A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores) * empty :( --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: 49fl <ircsurfer33@gmail.com>
This commit is contained in:
52
src/lib/commandBarConfigs/routeCommandConfig.ts
Normal file
52
src/lib/commandBarConfigs/routeCommandConfig.ts
Normal file
@ -0,0 +1,52 @@
|
||||
import { Command } from '../commandTypes'
|
||||
import { PATHS } from 'lib/paths'
|
||||
import { NavigateFunction, Location } from 'react-router-dom'
|
||||
export function createRouteCommands(
|
||||
navigate: NavigateFunction,
|
||||
location: Location,
|
||||
filePath: string
|
||||
) {
|
||||
const RouteTelemetryCommand: Command = {
|
||||
name: 'Go to Telemetry',
|
||||
displayName: `Go to Telemetry`,
|
||||
description: 'View the Telemetry metrics',
|
||||
groupId: 'routes',
|
||||
icon: 'settings',
|
||||
needsReview: false,
|
||||
onSubmit: (data) => {
|
||||
const path = location.pathname.includes(PATHS.FILE)
|
||||
? filePath + PATHS.TELEMETRY + '?tab=project'
|
||||
: PATHS.HOME + PATHS.TELEMETRY
|
||||
navigate(path)
|
||||
},
|
||||
}
|
||||
|
||||
const RouteHomeCommand: Command = {
|
||||
name: 'Go to Home',
|
||||
displayName: `Go to Home`,
|
||||
description: 'Go to the home page',
|
||||
groupId: 'routes',
|
||||
icon: 'settings',
|
||||
needsReview: false,
|
||||
onSubmit: (data) => {
|
||||
navigate(PATHS.HOME)
|
||||
},
|
||||
}
|
||||
|
||||
const RouteSettingsCommand: Command = {
|
||||
name: 'Go to Settings',
|
||||
displayName: `Go to Settings`,
|
||||
description: 'Go to the settings page',
|
||||
groupId: 'routes',
|
||||
icon: 'settings',
|
||||
needsReview: false,
|
||||
onSubmit: (data) => {
|
||||
const path = location.pathname.includes(PATHS.FILE)
|
||||
? filePath + PATHS.SETTINGS + '?tab=project'
|
||||
: PATHS.HOME + PATHS.SETTINGS
|
||||
navigate(path)
|
||||
},
|
||||
}
|
||||
|
||||
return { RouteTelemetryCommand, RouteHomeCommand, RouteSettingsCommand }
|
||||
}
|
Reference in New Issue
Block a user