Traces graphical applications remotely with apitrace, intended to be used in conjunction with the apitrace-remote-viewer
go build -o main cmd/server/*go
./main
- Create an app
- Trace the app
- Get the dump
- View the GL state
Add the details for an application to be traced. Details include:
- Name
- Description
- Git URL
- User
- Private key path
- Branch
- Build script
- Executable
- Timeout
- apitrace location
- glretrace location
Clones the git repo to a folder on disk, then runs the build script to produce the executable. Once built, the following command is ran against the executable:
apitrace trace myappWith the trace file written on disk, apitrace is used to dump the per-frame GL calls with the following command:
apitrace dump myapp.traceRetrieve the list of GL calls made for a specific frame of the app, beginning with frame 0. Clicking on a particular GL call will trigger a glretrace run to capture the GL state for that particular call:
glretrace -D=12345 myapp.traceFollowing the call to glretrace, the colour, depth, and stencil buffers are viewable, as well as the GL state, including uniforms, shaders, buffers, etc
Retrieves a list of the applications stored in the database
curl -X GET http://localhost:8080/apps[{"id":"hellmouthxyz","name":"hellmouthxyz","description":"jjkjklj","branch":"apitraceremote","traces":3}]Creates a new application in the database
curl -X POST -d '{"description":"jjkjklj","url":"https://github.com/fergloragain/hellmouthxyz.git","executable":"main","apiTrace":"/Users/hellmouthxyz/development/apitrace/build/apitrace","retrace":"/Users/hellmouthxyz/development/apitrace/build/glretrace","timeout":2,"user":"","privateKey":"","buildScript":"build.sh","branch":"apitraceremote","dumpImages":true}' http://localhost:8080/apps/hellmouthxyztest{"id":"hellmouthxyztest-6","name":"hellmouthxyztest","description":"jjkjklj","url":"https://github.com/fergloragain/hellmouthxyz.git","executable":"main","apiTrace":"/Users/hellmouthxyz/development/apitrace/build/apitrace","retrace":"/Users/hellmouthxyz/development/apitrace/build/glretrace","timeout":2,"user":"","privateKey":"","buildScript":"build.sh","active":false,"branch":"apitraceremote","traces":[],"dumpImages":true}Gets the details for the :name app in the database
curl -X GET http://localhost:8080/apps/hellmouthxyz-6{"id":"hellmouthxyz-6","name":"hellmouthxyz","description":"jjkjklj","url":"https://github.com/fergloragain/hellmouthxyz.git","executable":"main","apiTrace":"/Users/hellmouthxyz/development/apitrace/build/apitrace","retrace":"/Users/hellmouthxyz/development/apitrace/build/glretrace","timeout":2,"user":"","privateKey":"","buildScript":"build.sh","active":false,"branch":"apitraceremote","traces":["hellmouthxyz-trace-1","hellmouthxyz-trace-2","hellmouthxyz-trace-3"],"dumpImages":true}Updates an existing application in the database
curl -X PUT -d '{"description":"abc","url":"https://github.com/fergloragain/hellmouthxyz.git","executable":"main","apiTrace":"/Users/hellmouthxyz/development/apitrace/build/apitrace","retrace":"/Users/hellmouthxyz/development/apitrace/build/glretrace","timeout":2,"user":"","privateKey":"","buildScript":"build.sh","branch":"apitraceremote","dumpImages":true}' http://localhost:8080/apps/hellmouthxyztest-6{"id":"hellmouthxyztest-6","name":"hellmouthxyztest","description":"abc","url":"https://github.com/fergloragain/hellmouthxyz.git","executable":"main","apiTrace":"/Users/hellmouthxyz/development/apitrace/build/apitrace","retrace":"/Users/hellmouthxyz/development/apitrace/build/glretrace","timeout":2,"user":"","privateKey":"","buildScript":"build.sh","active":false,"branch":"apitraceremote","traces":[],"dumpImages":true}Retrieves a list of the traces stored in the database
curl -X GET http://localhost:8080/traces["hellmouthxyz-1-trace","hellmouthxyz-1-trace-1"]Creates a new trace in the database for the :name app
curl -X POST http://localhost:8080/traces/hellmouthxyztest{"id":"hellmouthxyztest-trace","appID":"hellmouthxyztest","name":"hellmouthxyztest-trace","status":"Pending","buildStdout":"","buildStderr":"","traceStdout":"","traceStderr":"","cloneStdout":"","cloneStderr":"","dumpStderr":"","targetDirectory":"","numberOfFrames":0,"retraces":[],"traceFile":""}Gets the details for the :name trace in the database
curl -X GET http://localhost:8080/traces/hellmouthxyz-23-trace{"id":"hellmouthxyz-23-trace","appID":"hellmouthxyz-23","name":"hellmouthxyz-23-trace","status":"Pending","buildStdout":"","buildStderr":"","traceStdout":"","traceStderr":"","cloneStdout":"","cloneStderr":"","dumpStderr":"","targetDirectory":"","numberOfFrames":0,"retraces":[],"traceFile":""}- Make the project
go getfriendly - Add config file for default values for new apps
- Add Docker files and a docker-compose.yaml
- Fix up deletion so that deletion of a project triggers deletion of:
- All DB data
- Retrace data
- Dump data
- App data
- All on disk data
- Project folder
- Trace directories
- All DB data
- Add pagination for viewing the dump; i.e. if a single frame makes 10,000 calls, then return the first 100 calls, and retrieve the next set when the page is scrolled to the bottom
- Trigger the
glretraceoperations asynchronously, and have the client application poll the status repeatedly - Add the a profiling call for
glretrace - Add logic so that instead of re-cloning the source code every time, a git pull is performed and a rebuild triggered, unless explicitly stated otherwise
- Move the executable into a separate trace folder
- Add disk statistics to the data set returned, so we know how much disk space a particular application/trace is using
- Rework and streamline the application triggering process, as well as stdout and stderr capture