HawkTracer is a highly portable, low-overhead, configurable profiling tool built in Amazon Video for getting performance metrics from low-end devices.
This sample code is made available under the MIT license. (See [LICENSE] file)
$ mkdir build # It'll be different on Windows
$ cmake ..
$ cmake --build . # This instead of make, so we don't need extra instructions for Windows
Use following interface to define scoped tracepoints:
HT_TP_GLOBAL_SCOPED_INT(int_label);
HT_TP_GLOBAL_SCOPED_STRING("foo");
Use JavaScript comments in your code
// @TracepointStart Name
// JS code here
// @TracepointStop Name
Use Lua pseudo-attributes in your code
--@TracepointStart Identifier
-- Lua code here
--@TracepointStop
[TBD]
[TBD]
- Install google-chrome or chromium browser
- Open the browser, and open chrome://tracing/ webpage
- Click load button and open file generated in the previous section
- You should see a callstack with timing
Please read [CONTRIBUTING.md] for details on our code of conduct, and the process for submitting pull requests to us.
- Hat tip to anyone who's code was used
- Inspiration
- etc