Beam test results of the dependence of signal size on incident particle flux in diamond pixel and pad detectors