How is weapon dps calculated?

How does this work? The green one seems much better but according to dps it’s not.