LogoLogo
About GitLabAcceptable Ads
  • Getting Started
  • Browser Ad-Filtering Solution
    • Features
    • Getting Started
      • Quickstart
      • Integrate the Solution
      • Set up user counting
    • Guides
      • User counting
      • Configure Solution settings
      • Run separate instances of the filtering engine
      • Update the Solution
      • Understand the snippets library
      • Create a filter list
      • Testing
    • Advanced
      • Services and classes
      • Sitekey
      • ADRs
      • Frame hierarchy
  • Snippets
    • Snippets Overview
    • Behavioral Snippets
      • abort-current-inline-script
      • abort-on-property-read
      • abort-on-property-write
      • abort-on-iframe-property-read
      • abort-on-iframe-property-write
      • array-override
      • cookie-remover
      • freeze-element
      • json-override
      • json-prune
      • override-property-read
      • prevent-listener
      • replace-fetch-response
      • replace-xhr-response
      • simulate-mouse-event
      • skip-video
      • strip-fetch-query-parameter
    • Conditional Hiding Snippets
      • hide-if-canvas-contains
      • hide-if-contains
      • hide-if-contains-image
      • hide-if-contains-similar-text
      • hide-if-contains-visible-text
      • hide-if-contains-and-matches-style
      • hide-if-has-and-matches-style
      • hide-if-labelled-by
      • hide-if-matches-computed-xpath
      • hide-if-matches-xpath
      • hide-if-matches-xpath3
      • hide-if-shadow-contains
    • Debugging Snippets
      • debug
      • log
      • profile
      • trace
    • Performance Snippets
      • race
    • Snippets Support by Platform
    • Node Highlighting
    • Accessing shadow DOM elements
  • Working with filters
  • DATA AND PRIVACY
    • Data collection at eyeo
Powered by GitBook
On this page
  • Use cases
  • Filter examples

Was this helpful?

Edit on GitLab
Export as PDF
  1. Snippets
  2. Debugging Snippets

profile

Last updated 2 months ago

Was this helpful?

The profile snippet activates profile mode, enabling performance monitoring for specific snippets.

This mode uses the to mark key points (like the beginning and end of the main logic in a snippet) and measure the elapsed time between them, expressed in milliseconds (ms).

When used, it logs an object containing performance data for the monitored snippet.

Rounded values in Firefox

Firefox reduces the precision of timestamps to protect user privacy, which can result in rounded values such as 0 or 1.

To address this, you can adjust the privacy.reduceTimerPrecision setting in about:config:Open Firefox and type about:config in the address bar.Search for privacy.reduceTimerPrecision.Toggle the setting to false.Verify if the duration values now include decimals.

If you continue to see rounded values, you may also want to toggle the privacy.resistFingerprinting setting.

Use cases

The profile snippet is ideal for monitoring the performance of specific snippets. It is particularly useful when combined with behavioral or conditional hiding snippets.

Filter examples

The table below provides examples of filters that use the profile snippet:

Filter
Result

profile; abort-on-property-read atob

Activates profile mode for the abort-on-property-read snippet, logging its performance whether it succeeds or fails.

profile; debug; abort-on-property-read atob

Combines profile mode with debug for enhanced monitoring and debugging.

Performance API