Quality control of petroleum products