It totally depends on the country, the jurisdiction, the quantities involved and the individual law enforcement officers you are dealing with.
And of course, it also depends on how you conduct yourself in dealing with said police officers.
If you want to know about your local area, try searching media reports or - if you are up to it - legal journals for previous cases or legal precedents.
You may be able to access searchable news archives and law databases through a library, especially an academic library of a university that teaches law.
I was picking mushrooms last week in the very same forest that some people got busted in - doing exactly that - only a few weeks earlier.
I didn't get caught, but the people that did had a reasonably large quantity of freshly picked Psilocybe mushrooms in their possession.
They were let off with a "drug diversion" - which is essentially a caution; they won't be charged or have to go to court, they won't have a conviction recorded or be issued with any fines. They simply have to attend a session at a drug and alcohol counselling service, and avoid a criminal record.
They were lucky.
I had the misfortune of experiencing a dodgy police raid on my apartment about 5 years ago, and they found small amounts of a number of drugs (dexedrine, cannabis, opium). They found some mushroom spore prints too, as well as some innoculating jars of mycelium for a shroom grow-op - but they had absolutely no idea what these were, and i simply stayed calm and went along with their assumptions about what they were, so they left them.
They didn't find any LSD, because blotter acid is pretty easy to hide - even if you're not expecting half a dozen cops to come and pull your place apart, and rifle through your belongings.
I was given a "drug diversion" - as i had just small quantities of drugs for personal use, and had to attend a "counselling session" that consisted of watching a corny video about the dangers of taking drugs and getting caught up in "the wrong crowd" - after which a consellor basically said "any questions, or drug problems you want to talk about?"
I replied politely that i didn't, and went home.
I live in Australia though; i'm not sure that it would have been the same in another part of the country - and obviously not every country is that reasonable in dealing with people caught with small anounts of drugs for personal use.