All Projects → aspiers → Etrace

aspiers / Etrace

Licence: mit
Emacs Lisp Latency Tracing for the Chromium Catapult Trace Event Format

Projects that are alternatives of or similar to Etrace

Profilinggo
A quick tour (or reminder) of Go performance tools
Stars: ✭ 219 (+386.67%)
Mutual labels:  tracing, performance, profiling
Stagemonitor
an open source solution to application performance monitoring for java server applications
Stars: ✭ 1,664 (+3597.78%)
Mutual labels:  tracing, performance, profiling
Tracetools
Tools to process Go trace logs into various profiles. Complement for "go tool trace".
Stars: ✭ 105 (+133.33%)
Mutual labels:  tracing, performance, profiling
thundra-agent-python
Thundra Lambda Python Agent
Stars: ✭ 36 (-20%)
Mutual labels:  tracing, profiling
iopipe-js
Build and run serverless apps with confidence on AWS Lambda with Tracing, Profiling, Metrics, Monitoring, and more.
Stars: ✭ 33 (-26.67%)
Mutual labels:  tracing, profiling
nodejs
Node.js in-process collectors for Instana
Stars: ✭ 66 (+46.67%)
Mutual labels:  tracing, profiling
probes-api
Software Activity Metering - Probes Open API
Stars: ✭ 31 (-31.11%)
Mutual labels:  tracing, profiling
perforator
Record "perf" performance metrics for individual functions/regions of an ELF binary.
Stars: ✭ 33 (-26.67%)
Mutual labels:  tracing, profiling
Nanoscope
An extremely accurate Android method tracing tool.
Stars: ✭ 1,023 (+2173.33%)
Mutual labels:  tracing, performance
Pyroscope
Continuous Profiling Platform! Debug performance issues down to a single line of code
Stars: ✭ 4,816 (+10602.22%)
Mutual labels:  performance, profiling
Home
Project Glimpse: Node Edition - Spend less time debugging and more time developing.
Stars: ✭ 260 (+477.78%)
Mutual labels:  performance, profiling
Trace Nodejs
Trace is a visualised distributed tracing platform designed for microservices.
Stars: ✭ 471 (+946.67%)
Mutual labels:  performance, profiling
iopipe-python
Python agent for AWS Lambda metrics, tracing, profiling & analytics
Stars: ✭ 77 (+71.11%)
Mutual labels:  tracing, profiling
Xprof
A visual tracer and profiler for Erlang and Elixir.
Stars: ✭ 246 (+446.67%)
Mutual labels:  tracing, profiling
pm2-io-apm
PM2.io APM for Node.JS
Stars: ✭ 131 (+191.11%)
Mutual labels:  tracing, profiling
Dd Trace Py
Datadog Python APM Client
Stars: ✭ 220 (+388.89%)
Mutual labels:  tracing, profiling
iopipe-go
Go agent for AWS Lambda metrics, tracing, profiling & analytics
Stars: ✭ 18 (-60%)
Mutual labels:  tracing, profiling
Ebpf exporter
Prometheus exporter for custom eBPF metrics
Stars: ✭ 829 (+1742.22%)
Mutual labels:  tracing, performance
Pinpoint
APM, (Application Performance Management) tool for large-scale distributed systems.
Stars: ✭ 11,883 (+26306.67%)
Mutual labels:  tracing, performance
Elinux
嵌入式 Linux 知识库 (elinux.org) 中文翻译计划;本项目发起人发布了《360° 剖析 Linux ELF》视频课程,欢迎订阅:https://www.cctalk.com/m/group/88089283
Stars: ✭ 193 (+328.89%)
Mutual labels:  tracing, profiling

etrace.el - Performance Tracing For Emacs Lisp

This package for GNU Emacs allows latency tracing to be performed on Emacs Lisp code and the results output to files using the Chromium Catapult Trace Event Format. These trace files can then be loaded into trace analysis utilities in order to generate flame graphs and other useful visualisations and analyses. For example, here's a flame graph for (a modified version of) the famous org-agenda function:

image

This package is built on top of elp.el, which is one of two elisp profiler's built into emacs. (The other is profiler.el; they are both mentioned in the Profiling section of the Elisp manual.) It records a separate trace using advice on the normal elp.el recording, since elp.el doesn't capture enough info itself.

Usage

Generating a trace file

  1. Either M-: (require 'etrace) or add (require 'etrace) to your Emacs config, or enable the micro-feature for it if you use micro-features from the non-Spacemacs Emacs config.

  2. (Optional) Run M-x customize-variable etrace-output-file to change where the trace will be written. It defaults to ~/etrace.json.

  3. Run M-x elp-instrument-package and type in a function prefix to instrument all the functions with that prefix. It uses a completion box so note that by default it will complete to whatever's selected in there. If you want to complete to a prefix with no corresponding function, you may be able to press the Up arrow until the text you typed is selected rather than any completion, although this depends on which completion interface you have configured.

    There's also M-x elp-instrument-function for individual functions.

  4. Run M-x etrace-clear.

  5. Execute the code which you want to analyse.

  6. Run M-x etrace-write to write out the trace file.

Analysing the trace file

There are several tools which can analyse the resulting trace file. Here are some suggestions, but if you know of other good alternatives, please submit them to this repository.

  • https://www.speedscope.app/

    This is an excellent Open Source interactive web-based flamegraph visualizer, which has 3 visualisation modes, keyboard shortcuts, lots of nice features, and good documentation. Simply upload your trace file and then start analysing.

  • https://ui.perfetto.dev/

    This tool can show you the total time and percentage of time taken by different functions in a selection range.

  • chrome://tracing

    If you are using Chromium, Google Chrome, or a similar derivative, open this built-in tracing tool, and click the load button to open the trace file. Use Alt+scroll to zoom.

If you successfully identify performance bottlenecks and fix them then repeat from step 4, or from step 3 if any code needs to be re-instrumented.

Finally, you can run M-x elp-restore-all to un-instrument any instrumented functions.

History and acknowledgements

This package was originally written by Tristan Hume and shared as a GitHub gist. However he didn't have plans to develop it further, so he generously handed over maintenance.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].