{"id":18669278,"url":"https://github.com/colrdavidson/spall-web","last_synced_at":"2025-05-16T07:04:56.518Z","repository":{"id":59642589,"uuid":"529475536","full_name":"colrdavidson/spall-web","owner":"colrdavidson","description":"Simple, Fast, Portable Profiling","archived":false,"fork":false,"pushed_at":"2025-02-05T03:48:32.000Z","size":4236,"stargazers_count":374,"open_issues_count":4,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-08T16:09:34.984Z","etag":null,"topics":["c","gamedev","odin-lang","performance-monitoring","profiler","profiling-library","wasm"],"latest_commit_sha":null,"homepage":"https://gravitymoth.com/spall","language":"Odin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/colrdavidson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["colrdavidson"]}},"created_at":"2022-08-27T03:56:59.000Z","updated_at":"2025-04-08T15:32:52.000Z","dependencies_parsed_at":"2023-02-01T03:31:06.940Z","dependency_job_id":"ce681d8b-4dc1-46a0-8b7f-168e303e77b4","html_url":"https://github.com/colrdavidson/spall-web","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colrdavidson%2Fspall-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colrdavidson%2Fspall-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colrdavidson%2Fspall-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colrdavidson%2Fspall-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colrdavidson","download_url":"https://codeload.github.com/colrdavidson/spall-web/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485055,"owners_count":22078767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","gamedev","odin-lang","performance-monitoring","profiler","profiling-library","wasm"],"created_at":"2024-11-07T08:46:33.842Z","updated_at":"2025-05-16T07:04:51.508Z","avatar_url":"https://github.com/colrdavidson.png","language":"Odin","funding_links":["https://github.com/sponsors/colrdavidson"],"categories":["Open-source Projects"],"sub_categories":["Vendor"],"readme":"# spall\n\nspall is a profiler library and a web-frontend for exploring your code and digging into potential performance problems.\n\n![spall use](media/spall.gif)\n\n^ this is a 180 MB (526 MB JSON equivalent), 5 minute trace from Happenlance, courtesy of @pmttavara!\n\n## Features\n- Zippy! spall can load 500 MB of .spall data into your browser in a second or two, and you can scroll and pan it at a glorious 165+ FPS\n- Easy to Use! Single-header C library for instrumenting your code\n- Numbers Galore! spall can collect a handful of very useful stats about your program without even breaking a sweat\n- Light/Dark Modes! You can blow your eyes out in light mode, relish the sweet neon colors in dark mode, or auto-switch with your system\n- Velociraptors Included! Uhh, wait, sorry, we're all out. No velociraptors here. You can pretend though.\n\nTry it over at [Gravity Moth](https://gravitymoth.com/spall)\n\n## Usage\n\nspall includes a small single-header C library, `spall.h`.\n\nspall currently supports 2 different file formats:\n- .json, in Google's trace format used by `perfetto`, `chrome://tracing`, and `speedscope`, described below\n- .spall, our custom binary format\n\nYou can either instrument your code with our header, or use your existing `chrome://tracing` compatible JSON dumping code.\n\n## Heads Up!\nIf you're starting from scratch, you probably want to use the spall header to generate events. The binary format has much lower\nprofiling overhead (so your traces should be more accurate), and ingests around 10x faster than the JSON format.\n\n\n## JSON Trace Format Overview\nIf you want to use JSON, spall expects events following [Google's JSON trace format](https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview)\nThey look like this:\n```\n[\n\t{\"cat\":\"function\", \"name\":\"main\", \"ph\": \"X\", \"pid\": 0, \"tid\": 0, \"ts\": 0, \"dur\": 1},\n\t{\"cat\":\"function\", \"name\":\"myfunction\", \"ph\": \"B\", \"pid\": 0, \"tid\": 0, \"ts\": 0},\n\t{\"cat\":\"function\", \"ph\": \"E\", \"pid\": 0, \"tid\": 0, \"ts\": 0}\n]\n```\n(spall doesn't care about trailing commas and close brackets are not required, to ease file creation / event streaming)\n\n### Field Types\n\n`cat` - Category of event. Currently unused\n\n`name` - the name of the event, a string\n\n`ph` - The type of event\n|    Type    | Symbol  |\n|------------|----------|\n|    Begin   |   \"B\"   |\n|    End     |   \"E\"   |\n| Complete   |   \"X\"   |\n\n`tid` - thread id, u32\n`pid` - process id, u32\n\nAll tids and pids must be between 0 and u32_MAX, as whole values\n\n`ts`  - timestamp, a double, in microseconds\n`dur` - timestamp, a double, in microseconds\n\n(A timestamp of 1 starts at 1 μs)\n\n## Event Types\n\nSpall currently supports only Begin, End, and Complete events\n\n### Complete\n```\n{\"cat\":\"function\", \"name\":\"foo\", \"ph\": \"X\", \"pid\": 0, \"tid\": 0, \"ts\": 0, \"dur\": 1},\n```\nComplete events require a duration field, because they track a function's start/end all in one\n\n### Begin\n```\n{\"cat\":\"function\", \"name\":\"myfunction\", \"ph\": \"B\", \"pid\": 0, \"tid\": 0, \"ts\": 0},\n```\n\n### End\n```\n{\"cat\":\"function\", \"ph\": \"E\", \"pid\": 0, \"tid\": 0, \"ts\": 0},\n```\nEnd events automatically close the most recent begin event with the same pid and tid, so they don't need names\n\n## Important Notes\n\nRegardless of ingest format, all begin and end events within a process/thread (pid/tid) are expected to be in earliest timestamp first, sorted order\nex:\n```\n[\n\t{\"cat\":\"function\", \"name\":\"main\", \"ph\": \"B\", \"pid\": 0, \"tid\": 0, \"ts\": 0},\n\t{\"cat\":\"function\", \"name\":\"foo\", \"ph\": \"B\", \"pid\": 0, \"tid\": 0, \"ts\": 1},\n\t{\"cat\":\"function\", \"ph\": \"E\", \"pid\": 0, \"tid\": 0, \"ts\": 2},\n\t{\"cat\":\"function\", \"ph\": \"E\", \"pid\": 0, \"tid\": 0, \"ts\": 3}\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolrdavidson%2Fspall-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolrdavidson%2Fspall-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolrdavidson%2Fspall-web/lists"}