Things have changed a lot since I was young (don't wheel me to the old folks home yet!)!
Okay, I have to admit that some of my writing can be somewhat dark (well, maybe a good deal more than somewhat). It's one of those genetic things. I didn't grow up in a dungeon or have assassin parents. I did write something in high school that sent an English teacher into shock and now a days would have caused 911 to get dialed. Don't worry, she got even with me. She ripped the writing out of my hands, so to speak, and without telling me, read it to 100, maybe 200 students. I don't remember how many for sure. There was also that thing where she submitted it to a publisher without asking, too. But other than that bit of trauma, pretty normal childhood otherwise.
Actually, I'm pretty squeamish when it comes to gory books or shocking violence. My daughter encouraged me to read Ender's Game recently (which I really enjoyed) but she gave me the caveat that it really is not a good example of a children's book because it was so violent. I was braced for the worst but still I read it. And I guess due to the author's good writing, perhaps it wasn't nearly as shocking as I expected. Still I worried because some people thought it might be a bit strong for some kids.
I worried because I am writing a long story right now (four part serial) that has a pretty brutal undercurrent in it, yet is targeted for 12+, maybe younger. By tweaking how experiential the story becomes I can control how violent the story seems, newspaper article containing something third hand or viewing the violence through the characters' eyes. Shifting scenes back and forth between those two throttles the violence, drama, and shock factor of the book. So I decided to go acquire some data on violence in current children's literature.
The first thing I tried was looking at a book called "Raven's Gate" which was a favorite of a kid in my target readership. The book is actually targeted for 10+. Ten or so pages into this book, I realized that if I had read the book when I was 10 years old, I would have had weeks of nightmares. Even as an adult, it just tweaked me the wrong way.
So I realized I needed more data to make a decision. Well I tried asking around. One of the best ways to create silence in a room or make someone online go dark is to ask them what they think the acceptable violence level is in a 10+ or 12+ novel. Part of it, I think, is that people don't really know the answer many times. The current trend seems to be to remove as many restrictions on kids as possible. Part of it too is that no author wants to risk being called a censor with the current anti-censorship campaign going on. Censorship is repugnant to most authors and so being called one would be about the most vile insult of all.
Still, how do you get the data? I looked around and found a site: http://www.commonsensemedia.com. They compile book ratings on how appropriate a book is for a targeted age group. So I did a search for books that were rated iffy for my targeted age group. The site not only has ratings but allows both parents and kids to comment on the book. The trend I noticed about iffy books is that kids will read a book, no matter how violent it gets, as long as it's a really good book. The more violent, the better the book has to be to compensate for the violence of the story. That trend seems to go down to age 10 for sure, age 9 in some kids.
In general, what really was required and appreciated by the kids was that the violence of the story fits the story line. The story is not gross just to be gross or violent just to lasso the few kids who measure the value of a book by how much blood is spilled. If the story is about a violent subject, then kids adverse to violence will not read it. If the story implies a mellow narrative and you include serious violence, the kid will be surprised and never trust or read you again. Ever.
So, unless you are deliberately trying to write a gory book, the guideline seems to be: the amount of violence to put in the book is the amount of violence that conveys the emotion of the story you are writing and nothing more violent than that. It's not a very satisfying measurement. But at least it is a measurement of some kind.