Coder Social home page Coder Social logo

Call stack depth is limited? about tuna HOT 9 CLOSED

nschloe avatar nschloe commented on September 28, 2024
Call stack depth is limited?

from tuna.

Comments (9)

nschloe avatar nschloe commented on September 28, 2024

There's no limit in the depth of as far as I recall. What makes you think there is more data?

from tuna.

schmave avatar schmave commented on September 28, 2024

Gotcha. When I view it using snakeview or the builtin pstats module I see much more info than when I use tuna.

from tuna.

nschloe avatar nschloe commented on September 28, 2024

Okay, typical case of snakeviz showing incorrect information. Just look at the times and you'll see that something is amiss:

times

Nothing beyong exception.py:31 can be inferred from the profile, and tuna stops there. This is explained in the main readme as well.

from tuna.

nschloe avatar nschloe commented on September 28, 2024

tuna should perhaps make this more explicit. Looking into it.

from tuna.

nschloe avatar nschloe commented on September 28, 2024

Fixed by #71.

from tuna.

schmave avatar schmave commented on September 28, 2024

Yes, those confusing times (also visible elsewhere in the call tree) are part of what has me looking for other profiling/analysis tools.

Thanks for the quick fix.

One other suggestion/question... in this case the function call that I care about is backend/file_storage/views.py:80(post). All the confusing calls on top of that are Django middleware functions that are irrelevant (and from what you say, the data about them is ambiguous anyway). Is it possible to specify a different root function to tuna so that it only shows calls below that root?

from tuna.

nschloe avatar nschloe commented on September 28, 2024

Just click on it in the browser.

from tuna.

schmave avatar schmave commented on September 28, 2024

Well, at least with tuna v0.4.0, I don't see that function call in the browser, so I can't click on it.

I tried upgrading just now, both v0.4.1 and v0.4.2 seem to have some error that causes them not to load any additional JS/CSS files. I see this in the Python console:

$ tuna ~/Downloads/stats-14-14-29.log --port 8081
Starting httpd on port 8081

127.0.0.1 - - [24/Apr/2020 13:01:24] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [24/Apr/2020 13:01:24] "GET /static/tuna.css HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 59635)
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py", line 317, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py", line 348, in process_request
    self.finish_request(request, client_address)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py", line 361, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py", line 696, in __init__
    self.handle()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/server.py", line 418, in handle
    self.handle_one_request()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/server.py", line 406, in handle_one_request
    method()
  File "/Users/evan/cs1-v2/venv/lib/python3.6/site-packages/tuna/main.py", line 229, in do_GET
    mimetype, _ = mimetypes.guess_type(filepath)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/mimetypes.py", line 291, in guess_type
    return _db.guess_type(url, strict)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/mimetypes.py", line 116, in guess_type
    scheme, url = urllib.parse.splittype(url)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/parse.py", line 938, in splittype
    match = _typeprog.match(url)
TypeError: expected string or bytes-like object
----------------------------------------
127.0.0.1 - - [24/Apr/2020 13:01:24] "GET /static/bootstrap.min.css HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 59637)
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py", line 317, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py", line 348, in process_request
    self.finish_request(request, client_address)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py", line 361, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py", line 696, in __init__
    self.handle()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/server.py", line 418, in handle
    self.handle_one_request()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/server.py", line 406, in handle_one_request
    method()
  File "/Users/evan/cs1-v2/venv/lib/python3.6/site-packages/tuna/main.py", line 229, in do_GET
    mimetype, _ = mimetypes.guess_type(filepath)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/mimetypes.py", line 291, in guess_type
    return _db.guess_type(url, strict)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/mimetypes.py", line 116, in guess_type
    scheme, url = urllib.parse.splittype(url)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/parse.py", line 938, in splittype
    match = _typeprog.match(url)
TypeError: expected string or bytes-like object
----------------------------------------

...

and this in the browser:
image

Could be user error on my end, but I'm not sure.

from tuna.

nschloe avatar nschloe commented on September 28, 2024

I cannot reproduce the error. Also, I don't get what you mean by "you don't see that function".

from tuna.

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.