Thoughts on using Mixpanel to track potential performance issues? #452
                  
                    
                      hamirmahal
                    
                  
                
                  started this conversation in
                General
              
            Replies: 1 comment 2 replies
-
| 
         I'm thinking of something like this, for example.       <pre className={styles.diffContent}>
        {fileToDiff[selectedFile].map((line, index) => {
          const lineLength = line.length;
          const startMs = performance.now();
          const renderedLine = renderLine(line, index, keywordConfigs);
          const endMs = performance.now();
          const milliseconds = endMs - startMs;
          if (milliseconds > 2) {
            mixpanel.track('Slow Line Render', {
              lineLength,
              milliseconds,
            });
            if (process.env.NODE_ENV === 'development') {
              console.debug(
                `Line with length ${lineLength} took ${milliseconds} ms to render.`
              );
            }
          }
          return renderedLine;
        })}
      </pre> | 
  
Beta Was this translation helpful? Give feedback.
                  
                    2 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
What are your thoughts on using Mixpanel to track potential performance issues?
Beta Was this translation helpful? Give feedback.
All reactions