Giter Club home page Giter Club logo

Comments (3)

jlfwong avatar jlfwong commented on June 4, 2024

Hi @xieve!

Happy to take it provided that...

  1. It doesn't require bringing in any large dependencies or cause performance problems elsewhere (by e.g. being expensive to detect what kind of profile it is)
  2. You're comfortable being a point of contact for changes needed to it
  3. You're able to write tests for it to ensure it doesn't break over time

from speedscope.

xieve avatar xieve commented on June 4, 2024
  1. It doesn't require bringing in any large dependencies or cause performance problems elsewhere (by e.g. being expensive to detect what kind of profile it is)

The file ending is .log, which is not used yet and unlikely to be used elsewhere. The contents are plain text and look like this:

Script_abc_runner_quest log opened (PC)
21171:PUSH:3053:1:abcRunnerQuest (24021278):abc_runner_quest..iAmInitialized
21171:POP:3053:1:abcRunnerQuest (24021278):abc_runner_quest..iAmInitialized
21171:PUSH:3053:1:abcRunnerQuest (24021278):abc_runner_quest..isInitInProgress
21171:POP:3053:1:abcRunnerQuest (24021278):abc_runner_quest..isInitInProgress

We can easily detect that header.

  1. You're comfortable being a point of contact for changes needed to it

Absolutely.

  1. You're able to write tests for it to ensure it doesn't break over time

I don't have any experience writing tests so far, but I'm familiar with the concept. I'll take a look at the docs.

Another issue to take note of: This profiler tends to output "malformed" data. Here are two examples I encountered while writing the parser:

at 1 open a
at 2 open b
at 3 close a
at 3 close b
at 1 close a
at 2 open b
at 3 close b

I wrote a heuristic algorithm that fixes these and possibly even worse cases. Alternatively, I could detect those cases and throw them out.

from speedscope.

jlfwong avatar jlfwong commented on June 4, 2024

The file ending is .log, which is not used yet and unlikely to be used elsewhere. The contents are plain text and look like this:

Sounds good! If you look at

// First pass: Check known file format names to infer the file type
, you'll see that we do two passes on import: first using a filename heuristic, and then failing that, using a content heuristic. Given the niche nature of this, I'd suggest only doing the content heuristic, since I do think it's possible existing formats use a .log extension.

I don't have any experience writing tests so far, but I'm familiar with the concept. I'll take a look at the docs.

Yeah, take a look at how the snapshot tests work. See, for example https://github.com/jlfwong/speedscope/blob/main/src/import/bg-flamegraph.test.ts

Another issue to take note of: This profiler tends to output "malformed" data. Here are two examples I encountered while writing the parser:

Will leave this to your discretion, since I'd be routing any bug reports to you

from speedscope.

Related Issues (20)

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.