Code Monkey home page Code Monkey logo

Comments (9)

gaogaotiantian avatar gaogaotiantian commented on June 2, 2024

How large is your trace file? Does it work with command line vizviewer?

from viztracer.

RmZeta2718 avatar RmZeta2718 commented on June 2, 2024

Yes, it works in command line. Sorry I forgot to include this information in the first place.

I can run vizviewer on the linux server, and port forward 9001 in vscode. Then I can open http://localhost:9001/ on my local Windows using Edge browser. Everything works fine this way.

My trace file is around 10MB.

It worth note that sometimes I will also see a blank screen when using the browser, but I just need to refresh the web page in this case and then perfetto shows up as normal. I'm not sure if this is relevant. I can't find a refresh counterpart in vscode.

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on June 2, 2024

So this behavior is always reproducible when you use vscode extension? It never works? It's possible that this is related to remote extension. I've never tested connecting to a remote server. I'm personally using WSL so that should work.

from viztracer.

RmZeta2718 avatar RmZeta2718 commented on June 2, 2024

I've tried many different result.json and it never works on remote server, 100% reproducible.

As I said, WSL does work in my environment (for the same 10M result.json), so it is weird that it fails on remote.

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on June 2, 2024

Okay. With right-click -> view with vizviewer, you are supposed to bring up a server process for the trace. Could you try opening localhost:9001 directly in your webbrowser and see if the website shows up? If not, could you confirm that there is such a process in your remote server? You can probably do ps -aux | grep viztracer in your remote server and search for the process.

There could be multiple reasons:

  1. The webserver was never brought up
  2. The webserver was brought up in a weird place with remote setup
  3. Webbrowser of VSCode refuses to load remote content
  4. Some network forwarding issues between the remote and local

Experiments mentioned above might help to narrow down the issue.

from viztracer.

RmZeta2718 avatar RmZeta2718 commented on June 2, 2024

Oh! I solved it. I just tried to port forward before clicking View with VizTracer, it's fixed! So, the issue is that the tab opens localhost:port, there is nothing unless correctly port forwarded. I'm not sure why WSL don't need port forward.

from viztracer.

RmZeta2718 avatar RmZeta2718 commented on June 2, 2024

Some experiment details:

  1. After clicking View with VizTracer, a blank vizviewer tab shows up as usual.
  2. I find the process python -m viztracer.viewer on server, with argument -p 9001, and lsof says 9001 is used by the same PID.
  3. Then I port forward 9001 using vscode, it forwards to localhost:9002 for me. I double check that 9001 is indeed in use on my local Windows (using TCPView that I downloaded 2 minutes ago).
  4. I can now open localhost:9002 in my browser, everything is fine.

So, what if the ports on local and remote are the same?

  1. Preoccupy 9001 use another vizviewer on server
  2. View with VizTracer, still a blank tab
  3. Now the vizviewer behind vscode has -p 9002 as argument, double checked using lsof
  4. I can port forward server:9002 to localhost:9002 in vscode, and open in browser, everything is fine.
  5. So I hope this means that 9001 on my local Windows is not a problem.

Then I port forward server:9002 -> localhost:9002 before clicking View with VizTracer (9001 is preoccupied), it works!

But if server uses 9001 and I forward server:9001 -> localhost:9002, the vizviewer tab is still blank, I think it is now opening localhost:9001

So, if the fix is to port forward for me when working with VSCode Remote, it should open tab based on vscode port forward result, instead of the port that server uses.

I'm also using another tool tensorboard, and there is a vscode extension for that. The extension forward 6006 for me when opened in vscode. And if localhost:6006 is in use, it correctly forwards to and opens localhost:6007

I think there is a built-in way to do this. For example, when I run vizviewer in vscode command line, it will automatically port forward.

I don't know if there is a better solution, it's now up to you, my hero.

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on June 2, 2024

Okay seems like I need to somehow forward the port. I'll take a look at it when I get a remote server! Thanks for the experiments!

from viztracer.

gaogaotiantian avatar gaogaotiantian commented on June 2, 2024

This is probably fixed by 0.2.3 extension. Could you try it out with the latest extension?

from viztracer.

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.