Purring is a sign of wellbeing for the house cat. She certainly purrs because you are petting her, but if she would be sleeping on you then chances are she would probably also be purring without you touching her.
Imagine this. When you pet her it's sort of like when you get a massage. You might fall asleep or you might drift off a little bit. Your cat is the same. Petting her for 15 minutes if she's purring the whole time is equivalent to her being completely relaxed. It is only natural for her to fall asleep.
If she is tired of the petting and want you to stop, she would just move or show you by play-attacking you. Cats can stop purring immediately if something makes them uncomfortable.
Like @Ross Presser mentioned, cats can purr while in pain, but this does not mean you should ever be alarmed when your cat purrs. However, it is important to check in on your cat and keep an eye on how they are doing. If they show any other new strange behaviour or react in a negative way combined with the purring, then a good suggestion would be to have a check-up at the vet.