Chapter 3 of Frederick Douglass' Narrative of the Life of Frederick Douglass includes the line: "Its excellent fruit was quite a temptation to the hungry swarms of boys, as well as the older slaves, belonging to the colonel, few of whom had the virtue or the vice to resist it." The word "swarms" is a metaphor.
Chapter 5 includes the line: "The children were then called, like so many pigs, and like so many pigs they would come and devour the mush; some with oyster- shells, others with pieces of shingle, some with naked hands, and none with spoons." The phrase "like so many pigs" is a simile or an analogy, if you will. I still think that simile is the more accurate answer.
These literary devices are extremely easy to find. You only need to read the brief chapters. Each one is full of many such devices.