TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

FunctionTrace: Graphical Python Profiler

118 pointsby alex_hirneralmost 2 years ago

16 comments

bgirardalmost 2 years ago
It's really cool to see the Firefox Profiler UI reused in new projects. I'm biased having worked on it, but it's a very powerful visualization tool for complex multi-threaded performance data.
scottwickalmost 2 years ago
Is there something about the actual profiler that differs from existing tools like pyinstrument [1] or py-spy [2]? I know pyinstrument has various output options and I wonder if it could potentially output something readable by the Firefox Profiler tool.<p>[1] : <a href="https:&#x2F;&#x2F;github.com&#x2F;joerick&#x2F;pyinstrument">https:&#x2F;&#x2F;github.com&#x2F;joerick&#x2F;pyinstrument</a> [2] : <a href="https:&#x2F;&#x2F;github.com&#x2F;benfred&#x2F;py-spy">https:&#x2F;&#x2F;github.com&#x2F;benfred&#x2F;py-spy</a>
评论 #36606811 未加载
kijedaalmost 2 years ago
The license is a bit perplexing at <a href="https:&#x2F;&#x2F;gitlab.com&#x2F;mbryant&#x2F;functiontrace&#x2F;-&#x2F;blob&#x2F;master&#x2F;LICENSE.md" rel="nofollow noreferrer">https:&#x2F;&#x2F;gitlab.com&#x2F;mbryant&#x2F;functiontrace&#x2F;-&#x2F;blob&#x2F;master&#x2F;LICEN...</a><p>It says it is licensed under Apache License 2.0, but also under &quot;Prosperity Public License 3.0.0&quot; which limits use for a commercial purpose to 30 days.
评论 #36606234 未加载
评论 #36606381 未加载
dangalmost 2 years ago
Related:<p><i>Building FunctionTrace, a graphical Python profiler</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24175395">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24175395</a> - Aug 2020 (4 comments)
kapilvtalmost 2 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;benfred&#x2F;py-spy">https:&#x2F;&#x2F;github.com&#x2F;benfred&#x2F;py-spy</a> is also really nice, and has an actual oss license.
BeefySwainalmost 2 years ago
If I&#x27;m understanding this correctly you need to use Cargo to install part of this. That makes it a lot harder to start using as someone in the Python ecosystem (who is not also in the Rust ecosystem)
评论 #36607075 未加载
itamarstalmost 2 years ago
It&#x27;s nice to see how many different approaches to profiling there are these days in Python. I work on another (commercial but with free plan) Python profiler, Sciagraph: <a href="https:&#x2F;&#x2F;sciagraph.com" rel="nofollow noreferrer">https:&#x2F;&#x2F;sciagraph.com</a>.<p>The main use case is data science and other long-running batch jobs. Some differences:<p>1. It does memory profiling at basically no performance overhead; sounds like for FunctionTrace it&#x27;s high overhead so off by default. And it catches _all_ memory allocations, not just Python API ones. This is based on using sampling, so it&#x27;s not useful for profiling tiny functions (but for data science&#x2F;scientific computing it&#x27;ll work just fine).<p>2. Uses sampling for performance profiling, unlike FunctionTrace. Again, perfectly fine for any non-micro-benchmark data science program.<p>3. Also has a timeline view, without having to upload your data anywhere.<p>4. No native stacks yet.<p>5. Shows you if you&#x27;re using CPU or I&#x2F;O for every particular sample.
评论 #36617566 未加载
not-my-accountalmost 2 years ago
Functiontrace is very good! I’ve used it a lot for hammering down bottlenecks, and it is easy to drop in to a script
megasergalmost 2 years ago
Looks like it supports native stack as well, great! Most bottlenecks in seriously performance-sensitive programs are in the native code, which makes built-in tools like cProfile hardly useful.
waydeggalmost 2 years ago
It&#x27;s a shame there isn&#x27;t any support for coroutines. I&#x27;m really hoping some profiling tool that comes along to handle them + threads&#x2F;processes.
Dork1234almost 2 years ago
Is this something that could be made to work with MicroPython?
评论 #36606257 未加载
评论 #36611618 未加载
ragebolalmost 2 years ago
Functiontrace is awesome. It&#x27;s easier to use than most other Python profilers in my experience, with a great viewer through Firefox too.
actinium226almost 2 years ago
How does this compare to snakeviz?
评论 #36621551 未加载
jzelinskiealmost 2 years ago
Whatever happened to scalene?
评论 #36607269 未加载
MistaIAalmost 2 years ago
How about Jupiter Notebooks?
RockRobotRockalmost 2 years ago
looks great. wish jetbrains implemented this