This sentence is a metaphor. Metaphors are rhetorical figures of speech which have to do with symbolic comparisons without the use of comparing words such as like or as (because when those words are used, it is a simile). So here, the man is compared to a machine based on how many hours he can work. It is also not an analogy, because analogies are references to people or events outside of the work where the analogy is used.