Skip to content

Commit

Permalink
Move speedscore from deps to assets
Browse files Browse the repository at this point in the history
  • Loading branch information
frandiox committed Jan 16, 2025
1 parent 6e9888c commit f8bb4d6
Show file tree
Hide file tree
Showing 21 changed files with 987 additions and 43 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@
],
"project": "**/*.ts!",
"ignoreDependencies": [
"@ast-grep/napi",
"speedscope"
"@ast-grep/napi"
],
"vite": {
"config": [
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/bin/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ esBuild({
from: ['../app/assets/**/*'],
to: ['./dist/assets'],
},
{
from: ['../theme/assets/**/*'],
to: ['./dist/assets'],
},
{
from: ['../app/templates/**/*'],
to: ['./dist/templates'],
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"./package.json": "./package.json"
},
"main": "src/index.js",
"module": "src/index.js",
Expand Down Expand Up @@ -102,7 +103,6 @@
},
"dependencies": {
"@ast-grep/napi": "0.33.0",
"speedscope": "1.21.0",
"esbuild": "0.24.0"
},
"devDependencies": {
Expand Down
Binary file not shown.
4 changes: 4 additions & 0 deletions packages/theme/assets/speedscope/demangle-cpp.1768f4cc.js

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
324 changes: 324 additions & 0 deletions packages/theme/assets/speedscope/file-format-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,324 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CloseFrameEvent": {
"properties": {
"at": {
"title": "at",
"type": "number"
},
"frame": {
"title": "frame",
"type": "number"
},
"type": {
"enum": [
"C"
],
"title": "type",
"type": "string"
}
},
"required": [
"at",
"frame",
"type"
],
"title": "CloseFrameEvent",
"type": "object"
},
"FileFormat.EventType": {
"enum": [
"C",
"O"
],
"title": "FileFormat.EventType",
"type": "string"
},
"FileFormat.EventedProfile": {
"properties": {
"endValue": {
"title": "endValue",
"type": "number"
},
"events": {
"items": {
"anyOf": [
{
"$ref": "#/definitions/OpenFrameEvent"
},
{
"$ref": "#/definitions/CloseFrameEvent"
}
]
},
"title": "events",
"type": "array"
},
"name": {
"title": "name",
"type": "string"
},
"startValue": {
"title": "startValue",
"type": "number"
},
"type": {
"enum": [
"evented"
],
"title": "type",
"type": "string"
},
"unit": {
"$ref": "#/definitions/FileFormat.ValueUnit",
"title": "unit"
}
},
"required": [
"endValue",
"events",
"name",
"startValue",
"type",
"unit"
],
"title": "FileFormat.EventedProfile",
"type": "object"
},
"FileFormat.File": {
"properties": {
"$schema": {
"enum": [
"https://www.speedscope.app/file-format-schema.json"
],
"title": "$schema",
"type": "string"
},
"activeProfileIndex": {
"title": "activeProfileIndex",
"type": "number"
},
"exporter": {
"title": "exporter",
"type": "string"
},
"name": {
"title": "name",
"type": "string"
},
"profiles": {
"items": {
"anyOf": [
{
"$ref": "#/definitions/FileFormat.EventedProfile"
},
{
"$ref": "#/definitions/FileFormat.SampledProfile"
}
]
},
"title": "profiles",
"type": "array"
},
"shared": {
"properties": {
"frames": {
"items": {
"$ref": "#/definitions/FileFormat.Frame"
},
"title": "frames",
"type": "array"
}
},
"required": [
"frames"
],
"title": "shared",
"type": "object"
}
},
"required": [
"$schema",
"profiles",
"shared"
],
"title": "FileFormat.File",
"type": "object"
},
"FileFormat.Frame": {
"properties": {
"col": {
"title": "col",
"type": "number"
},
"file": {
"title": "file",
"type": "string"
},
"line": {
"title": "line",
"type": "number"
},
"name": {
"title": "name",
"type": "string"
}
},
"required": [
"name"
],
"title": "FileFormat.Frame",
"type": "object"
},
"FileFormat.IProfile": {
"properties": {
"type": {
"$ref": "#/definitions/FileFormat.ProfileType",
"title": "type"
}
},
"required": [
"type"
],
"title": "FileFormat.IProfile",
"type": "object"
},
"FileFormat.Profile": {
"anyOf": [
{
"$ref": "#/definitions/FileFormat.EventedProfile"
},
{
"$ref": "#/definitions/FileFormat.SampledProfile"
}
]
},
"FileFormat.ProfileType": {
"enum": [
"evented",
"sampled"
],
"title": "FileFormat.ProfileType",
"type": "string"
},
"FileFormat.SampledProfile": {
"properties": {
"endValue": {
"title": "endValue",
"type": "number"
},
"name": {
"title": "name",
"type": "string"
},
"samples": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"title": "samples",
"type": "array"
},
"startValue": {
"title": "startValue",
"type": "number"
},
"type": {
"enum": [
"sampled"
],
"title": "type",
"type": "string"
},
"unit": {
"$ref": "#/definitions/FileFormat.ValueUnit",
"title": "unit"
},
"weights": {
"items": {
"type": "number"
},
"title": "weights",
"type": "array"
}
},
"required": [
"endValue",
"name",
"samples",
"startValue",
"type",
"unit",
"weights"
],
"title": "FileFormat.SampledProfile",
"type": "object"
},
"FileFormat.ValueUnit": {
"enum": [
"bytes",
"microseconds",
"milliseconds",
"nanoseconds",
"none",
"seconds"
],
"title": "FileFormat.ValueUnit",
"type": "string"
},
"IEvent": {
"properties": {
"at": {
"title": "at",
"type": "number"
},
"type": {
"$ref": "#/definitions/FileFormat.EventType",
"title": "type"
}
},
"required": [
"at",
"type"
],
"title": "IEvent",
"type": "object"
},
"OpenFrameEvent": {
"properties": {
"at": {
"title": "at",
"type": "number"
},
"frame": {
"title": "frame",
"type": "number"
},
"type": {
"enum": [
"O"
],
"title": "type",
"type": "string"
}
},
"required": [
"at",
"frame",
"type"
],
"title": "OpenFrameEvent",
"type": "object"
},
"SampledStack": {
"items": {
"type": "number"
},
"type": "array"
}
},
"$ref": "#/definitions/FileFormat.File"
}
Loading

0 comments on commit f8bb4d6

Please sign in to comment.