Skip to content

'My Code' Filtering

You might see generated or third-party code in your your metrics and graphs. That’s distracting, but we can fix that.

Create a file Raptor/Code.js and write a filter like this:

global.isMyCode = function(node) {
  if (node.sourceFilePath != null) {
    let filePath = node.sourceFilePath.toLowerCase().replace(/\\/g, "/");
    return filePath.includes("assets/mygame") || filePath.includes("assets/mycompany");
  }

  return true;
}