First, I 100% agree with jakebeal's answer.
I just want to elaborate a bit more on why questions of the type "how do I compare with my peers" or "am I in the top 10%" are entirely the wrong question to ask. Consider the following three cases:
Jason enrolled in a small, intensive seminar course. The class is known to have a heavy workload with lots of student participation and input. The professor is known to grade on an absolute/uncurved scale, and is happy to fail the entire class or give the entire class A+'s as the situation merits. The course has 10 students in it this semester. Jason worked really hard and impressed his professor, earning a well-deserved A-. There were two students who earned As, Maria in particular also won a Rhodes Scholarship for next year.
Would the professor say that Jason is in the top 10 or 20% of his class? No. But what would the professor write in the recommendation letter? He will explain that the course Jason took is a small seminar course, that even though his grades do not place him in the top 20%, this should not be counted against Jason, and that Jason is in fact a very hard working student that he regards highly.
Marshall enrolled in a large linear algebra course. He did great, his grades are consistently in the top of the class. He comes to office hours regularly and asks great questions. Through chatting with him, his instructor found out that Marshall had in fact enrolled in the Honors version of the same course last semester, but decided to drop the Honors version halfway through the semester because "he made a few dumb mistakes and got only a B+ on the first midterm".
When the undergraduate studies director came asking the instructor whether Marshall should be given an A+ for his stellar work in the linear algebra course, the instructor responds that she does not believe so, since Marshall only excelled because he already "knew" the material, and rather than challenging himself with the honors material he decided to go for the "easy A" for his transcript. And while he has certainly demonstrated work deserving of an A, she does not think Marshall should be rewarded with an A+ which is only given when student work goes above and beyond what is expected.
Tony took a large biochemistry class. He goes to lecture regularly, works very hard, and got perfect scores on pretty much every assignment and almost every lab. At the end of the semester Tony goes to the professor in charge of the course and ask where he places among his peers.
Prof: "What's your name again?"
Tony: "Tony Smith"
Prof: "Let me check" ... clicks away at a computer ... "just a moment" ... clicks more at a computer ... "ah! You seem to have the highest grades in my class. Congratulations."
Tony: "Will you write me a recommendation letter for Y Scholarship?"
Prof: "Well, I don't really have a reason to say no. But I don't really know you that well. Tell you what, let me check with your TA to see if we can say something nice about you. What's your name and which section are you in again?"
Sure, it would make everybody's life easier if you happen to be the best student your professor has ever taught. But if you are really a strong student, and the professor is willing to write you a strong recommendation letter, then he or she will definitely be willing to bend over backwards to justify your possible lower rankings when compared to your peers. On the other hand, if you are really not that strong a student, but merely a giant among midgets, then if you choose a professor entirely based on comparisons with your "peers" you may end up with a recommendation letter reflecting just that.
The moral of the story really is this: your ranking among your classmates in the class you took with a professor (or any of these sorts of peer comparison) are at best proxy metrics for how the professor think of you. But proxy indicators are only useful when the "thing" you really want to measure cannot be measured. In this case, however, the "thing" you really want to know is whether the professor will write you a strong letter, so don't go about playing with proxy indicators which can have all sorts of false positives or false negatives and ask the right question already.