sqlitecudansight-systems

How can I export nsys' output qdrep files?


I've run NSight Systems' command-line variant, nsys to profile an app; and it generated a .qdrep file. The profiling can be run with -export=sqlite, to also get a nicely-readable sqlite database as the output, but - this didn't happen in my case.

Is there some command-line, non-GUI tool I could use to export the .qdrep file I have into a more accessible format? I know that when actually profiling, I can have nsys produce an sqlite file itself, so converting .qdrep to sqlite would be nice; but anything else is also acceptable.


Solution

  • Option 1: The nsys stats command

    The stats command of NSight Systems is actually not intended for exporting .qdrep's to SQLite format, but rather to generate statistics of some kind using an SQLite database. However, it turns out that if you have a .qdrep but no SQLite, it will export the former into the latter before doing the rest of the work. So, this may work:

    nsys stats report.qdrep
    

    Caveat: Haven't tried it myself yet.

    Option 2: nsys-exporter

    There's a utility which is bundled with NSight Systems, named nsys-exporter. While it is clearly marked as a "beta tool" - what is life but a beta, right? So you could write:

    nsys-exporter -s report.qdrep report.sqlite
    

    and it will work. There are additional export formats: Text, JSON, HDF5 (but they might not be exactly what you expect - try and see what exactly comes out.)