GithubHelp home page GithubHelp logo

colrdavidson / spall-web Goto Github PK

View Code? Open in Web Editor NEW
291.0 8.0 10.0 4.28 MB

Simple, Fast, Portable Profiling

Home Page: https://gravitymoth.com/spall

License: MIT License

Python 0.94% Odin 77.96% HTML 1.13% JavaScript 11.95% Shell 0.10% C 7.92%
odin-lang performance-monitoring wasm gamedev profiler profiling-library c

spall-web's People

Contributors

colrdavidson avatar jack-punter avatar kelimion avatar pmttavara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spall-web's Issues

Light mode default

spall-web/src/spall.js

Lines 622 to 638 in 5129ce6

let color_ret = sessionStorage.getItem("colormode");
if (color_ret === "") {
sessionStorage.setItem("colormode", "auto");
}
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
let color_ret = sessionStorage.getItem("colormode");
if (color_ret === "auto") {
let is_dark = event.matches;
window.wasm.set_color_mode(true, is_dark);
wakeUp();
}
})
if (color_ret === "auto") {
window.wasm.set_color_mode(true, get_system_colormode())
} else {
window.wasm.set_color_mode(false, color_ret === "dark")
}

Should auto colors be the default setting? It's defaulting to light for me, where auto is the next in the cycle.

Unable to load Spall

I have the most recent version of Odin and just downloaded Spall, but I'm unable to use it.

Whenever I try to load http://localhost:8000/spall.html I got this message:

image

Looking at browser console, I got this message:

LinkError: WebAssembly.instantiate(): Import #5 module="env" function="fmax": function import requires a callable
init @ spall.js:385

Then a little later there's another error:

Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received

License inconsistency in spall.h vs LICENSE

spall.h has // SPDX-License-Identifier: 0BSD but the repo LICENSE file is MIT.

The examples mostly do not have license info, so one might assume they fall under MIT by default.

Would be nice to more clearly specify things to be one license or the other, or at least resolve the ambiguity.

Phillip Wishlist

  • Support ingesting a custom binary format instead of only JSON
    • Maybe using media molecule serialization for backwards compatibility between versions there?
  • Support RDTSC timestamps as units
    • Ingest a timestampsPerSecond value in the file for conversion
      • Optionally fallback to a system value determined by tracey if that's possible to do in wasm/js
  • Detect ZIP file inputs and automatically extract them using a streaming decompressor API
  • Dynamically set the maximum zoom level to the double precision limit (which depends on the scroll position)
    • no more jitter ๐Ÿ˜ƒ

Cannot load speedscope trace

I've got this small trace (~11MB) that I can check with speedscope just fine, but when I upload it into the Spall Web demo, I get:

Your JSON file is invalid! got 6, expected [ or {

I don't see any issue with the json, though and since speedscope can load it just fine, I don't think it's that.

Anything I can do to help figure out what the problem is, here?

Fails to build on odin dev-2023-05

Here is the error:

C:\Users\Cameron\Documents\spall>python build.py
Compiling...
Failed to execute command:
        "C:\Users\Cameron\Documents\odin\odin\\bin\wasm-ld" "C:/Users/Cameron/Documents/spall/build/spall.wasm.o" -o "C:/Users/Cameron/Documents/spall/build/spall.wasm"  --allow-undefined  --import-memory --initial-memory=131072000 --max-memory=4294967296
Traceback (most recent call last):
  File "C:\Users\Cameron\Documents\spall\build.py", line 43, in <module>
    subprocess.run([
  File "C:\Users\Cameron\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['odin', 'build', 'src', '-collection:formats=formats', '-target:js_wasm32', '-target-features:+bulk-memory', '-extra-linker-flags:--import-memory --initial-memory=131072000 --max-memory=4294967296', '-out:build/spall.wasm', '-debug']' returned non-zero exit status 4294967295.

Is there an intended odin compiler version?

How to open profile.spall?

Great project!

I've tried examples (e.g. native_auto_tracing) and cannot load profile.spall. I'm getting this:
image

What I'm doing wrong?

Web view crash with profile.spall

Thanks for making this tool!

I had a go using spall_native_auto.h but the file it generates crashes the web view. Seems to happen even when I don't initialise any threads for profiling using spall_auto_thread_init().

I've attached the file. Let me know if you'd like anything more to reproduce it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.