[HN Gopher] Show HN: React Geiger - performance profiling using ...
       ___________________________________________________________________
        
       Show HN: React Geiger - performance profiling using sound
        
       Author : kristiandupont
       Score  : 153 points
       Date   : 2024-03-09 18:15 UTC (1 days ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | jitl wrote:
       | Going to install this and see how much faster we get
        
       | ydant wrote:
       | Cool idea.
       | 
       | This makes me wonder if there's something similar for log files.
       | I sometimes find myself doing adhoc analysis of live logs using
       | visual cues, but auditory ones are really powerful - just never
       | think of using sound for diagnosis/debugging purposes.
        
         | thwarted wrote:
         | Yes, for network related activity. Peep.
         | 
         | https://github.com/the-real-neil/peep
         | 
         | Previously discussed on HN
         | 
         | https://news.ycombinator.com/item?id=33017337
        
         | jafarlihi wrote:
         | Relevant to the auditory monitoring is my project called sysm:
         | https://github.com/jafarlihi/sysm
         | 
         | It gives you a framework for configuring such audio pieces.
        
         | fragmede wrote:
         | A plugin for graphana or datadog/similar would be amazing. a
         | ping at one frequency for a request hitting the load balancer,
         | a ping at a different frequencies for a request hitting a given
         | endpoint, a bloop for a request hitting Kafka/the queue, a tone
         | that lasts for as long as the job takes to process the job. a
         | bong for a request hitting the db lasting as long as the query
         | takes. the combined cacofony of sound would grow to feel
         | comfortable when the site is properly operational. and then,
         | with it just sitting open in the background, if something is
         | off, someone could immediately tell without sitting there
         | watching graphs when their brain subconsciously says something
         | happened to the usual pitter patter of the machine operating.
        
           | leeoniya wrote:
           | we had one hackathon project a couple years ago at Grafana
           | that used audio for tracing trendlines for a11y :)
        
           | nextaccountic wrote:
           | Something like this for Wikipedia http://listen.hatnote.com/
           | 
           | https://en.wikipedia.org/wiki/Listen_to_Wikipedia
        
       | pcthrowaway wrote:
       | > Geiger: AudioContext did not start. To enable Geiger, you need
       | to give permission to play audio on this page.
       | 
       | anyone know how to do this in chrome?
        
         | __float wrote:
         | There's a small "settings" button to the left of the URL. Click
         | it, and if it shows Sound already, enable it. Otherwise, click
         | "Site settings" and enable it from that list.
        
           | skykooler wrote:
           | Is there a way to do this in Firefox?
        
             | kristiandupont wrote:
             | I am having trouble making it work on Firefox. I guess I
             | could add an option to show a little button. Playing audio
             | is allowed, it's the autoplay aspect that isn't.
        
               | its_bbq wrote:
               | Most browsers will accept a mouse click or screen tap as
               | user action which allows audio playback. I've used
               | overlays to solve this problem, for example on
               | https://cafegoblin.com (shameless plug for my friend's
               | zine)
        
         | cosmotic wrote:
         | I couldn't get it working in Edge, Firefox, or Safari.
         | Eventually got it working in Chrome following the instructions
         | already provided
        
       | demarq wrote:
       | works like a dream, also surprisingly bearable to just leave it
       | running during development not just when debugging.
       | 
       | Great work!
        
         | ipsum2 wrote:
         | A more pleasant sound (not replicating a literal Geiger
         | counter) would be more useful imo.
        
           | GuB-42 wrote:
           | Maybe the unpleasant sound is a feature, not a bug.
        
             | solardev wrote:
             | I wonder if you can make a song out of it by using
             | juuuuuust the right performance profile, tailoring your
             | async loops and such just right.
        
               | ColonelPhantom wrote:
               | Like Kraftwerk?
               | https://www.youtube.com/watch?v=pyuxz9R2XiY
               | 
               | (It's actually the build-up to Radioactivity, but it's
               | often listed as a separate track for some reason.)
        
         | kristiandupont wrote:
         | Thank you! The only concern is that it adds overhead as well,
         | but it doesn't seem to be too bad.
        
       | btbuildem wrote:
       | Back in the day when computers were slow (like, megahertz slow)
       | you could do this with code execution to help with debugging. If
       | you played with a piece of code long enough you'd get very
       | familiar with the patterns (they were tones, not just ticks) and
       | it was easy to tell when something was off / different.
        
         | seabass-labrax wrote:
         | And later, when computers weren't so slow but still required
         | multiple fans and HDDs (using real metal discs!) you got an
         | auditory indication of resource utilisation. I do wonder what
         | we'll say in the future when we look back at computers from
         | this time - perhaps it won't be so much an auditory clue, but
         | the subtle feel of one's phone getting warm in your hand when
         | it is running all cores at full clock?
        
         | CapsAdmin wrote:
         | With my speaker setup I always had slight gpu coil whine from
         | gpu usage.
         | 
         | This has helped me a few times to figure out if the gpu is
         | doing any work at all when trying to figure out why something
         | in ie pytorch is slow.
        
       | pcloadletter_ wrote:
       | This is a pretty funny idea. Love seeing this kind of creativity.
        
       | mhh__ wrote:
       | I had something like this going for L2 cache misses a while ago
        
         | a1o wrote:
         | That's pretty cool! Do you still happen to have it somewhere?
         | How did you do the detection?
        
       | oceanparkway wrote:
       | Hilarious/great. How did you think of this?
        
         | kristiandupont wrote:
         | Thank you! It was just thinking of ways to get notified of
         | unnecessary re-renders in a way that would be tolerable to have
         | enabled most of the time. Polluting the console or showing
         | visual cues didn't really fit that, so this came up.
        
       | DennisL123 wrote:
       | The idea is at least ten years old:
       | https://blog.mapbox.com/audiolizing-server-query-rate-749d5a...
        
         | awestroke wrote:
         | So what?
        
           | foolswisdom wrote:
           | No "so what". I read the comment as purely informational.
        
             | DennisL123 wrote:
             | indeed
        
       | madjam002 wrote:
       | There's also https://github.com/tomhicks/react-audible-debug
       | which has been around for some time, I think it has a clearer
       | sound for identifying excessive re-renders, but it's definitely a
       | little more annoying :)
       | 
       | https://stackblitz.com/edit/react-9vb6xn?file=src%2FApp.js
        
       | Zetaphor wrote:
       | I had a similar idea for Linux inspired by my longing for the
       | sound of mechanical hard drives:
       | 
       | https://github.com/Zetaphor/SysTone
        
       | jakobloekke wrote:
       | Nice :) I built the same thing a few years back for RxJS
       | debugging. Turned out to be really useful!
        
       | weinzierl wrote:
       | There is a Geiger malloc implementation too, discussed here
       | previously: https://news.ycombinator.com/item?id=24303832
        
       ___________________________________________________________________
       (page generated 2024-03-10 23:02 UTC)