Comments (9)
How large is your trace file? Does it work with command line vizviewer
?
from viztracer.
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.
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.
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.
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:
- The webserver was never brought up
- The webserver was brought up in a weird place with remote setup
- Webbrowser of VSCode refuses to load remote content
- Some network forwarding issues between the remote and local
Experiments mentioned above might help to narrow down the issue.
from viztracer.
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.
Some experiment details:
- After clicking View with VizTracer, a blank vizviewer tab shows up as usual.
- I find the process
python -m viztracer.viewer
on server, with argument-p 9001
, andlsof
says 9001 is used by the same PID. - 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). - I can now open
localhost:9002
in my browser, everything is fine.
So, what if the ports on local and remote are the same?
- Preoccupy 9001 use another
vizviewer
on server - View with VizTracer, still a blank tab
- Now the
vizviewer
behind vscode has-p 9002
as argument, double checked usinglsof
- I can port forward
server:9002
tolocalhost:9002
in vscode, and open in browser, everything is fine. - 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.
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.
This is probably fixed by 0.2.3 extension. Could you try it out with the latest extension?
from viztracer.
Related Issues (20)
- `log_sparse=True` doesn't work with context manager HOT 10
- Time.monotonic makes it impossible to line up distributed traces HOT 1
- NameError HOT 1
- `SNAPTRACE_TRACE_SELF` typo at `snaptrace.c` HOT 2
- JSONDecodeError in report_builder.py HOT 20
- vizviewer fails HOT 2
- command not found: vizviewer HOT 5
- vizobject/vizcounter not working for Inheritance HOT 3
- Bug: args that overlap with viztracer is lost in subprocess.Popen HOT 1
- Unable to use @trace_and_save with multiprocessing HOT 1
- VsCode里右键选择Trace with Viztracer后报错 HOT 1
- Linux 上 VSCode extension 打开 viztracer 的结果文件出现问题 HOT 4
- No reminder of port conflict when using the parameter "--use_external_processor" HOT 1
- Clear `viztmp` file even if there's something wrong with trace report saving HOT 1
- Please provide Wheels for Apple Silicon HOT 5
- please provide conda package for the latest version of viztracer HOT 1
- Jupyter Support: Why not have a cell magic too HOT 1
- "Wait for child processes to finish, Ctrl+C to skip" forever loop and no response HOT 2
- inline viztracer cannot trace multiprocess HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from viztracer.