Once intentionally, with a P3AT, about 25 rounds at a coffee can on a fence post.
Right ear rang for 3 days, won't be doin' that one again.
Prior to that, was taking turns with FiL on coon-watch for some critters that had been harassing their chickens (raccoons had killed-slaughtered, really, they ate none of them-the entire brood the previous year).
About 5-10 shots of 22LR a night (shot from the kitchen table through a screen window) for a week. There were a lot 'o coons in them there woods-we got 1 almost every shot.
No hearing issues, from that one, but much longer barrel and very small cartridge.
"The best diplomat I know is a fully charged phaser bank" - Montgomery Scott