> 
> "Hagrid," said Harry loudly, "give it two weeks and Norbert's going
>  to be as long as your house. . .”  
> 
> 
> 
> The following week dragged by. Wednesday night found Hermione and
>  Harry sitting alone in the common room, long after everyone else had
>  gone to bed. The clock on the wall had just chimed midnight when the
>  portrait hole burst open. Ron appeared out of nowhere as he pulled off
>  Harry's invisibility cloak. He had been down at Hagrid's hut, helping
>  him feed Norbert, who was now eating dead rats **by the crate**.   
> 
>  "It bit me!" he said, showing them his hand, which was wrapped in a bloody handkerchief. "I'm not going to be able to hold a quill
>  for a week. I tell you, that dragon's the most horrible animal I've
>  ever met, but the way Hagrid goes on about it, you'd think it was a
>  fluffy little bunny rabbit. When it bit me he told me off for
>  frightening it. And when I left, he was singing it a lullaby." (Harry Potter and the Sorcerer's Stone)
> 
> 
> 

What does ‘by’ mean?  

(A) in measuring units of: Apples are sold by the bushel. ([Dictionary.com](http://dictionary.reference.com/browse/by?s=t))  

(B) near to or next to: a home by a lake. ([Dictionary.com](http://dictionary.reference.com/browse/by?s=t))