In an image forming apparatus, a high-density portion and a low-density portion are arranged close to each other such that a boundary between the high-density portion and the low-density portion intersects with the conveyance direction of a density detection patch. The toner quantity measuring device is designed to measure the quantity of the toner T on a developing roller 510 which carries coloring agent-containing toner T in the form of a thin layer. The system halts task scheduling, measures CPU performance at the new performance state and resumes task scheduling within the constraints of the new performance state. The ground wall insulation and the conductive tape are cured.