We investigated decoherence sources in Ramsay measurement, which represents the depahsing time in superconducting transmon qubit in 3D cavity. The dephasing time is strongly influenced by the measurement environment in addition to the qubit itself. We studied the influence of the drive and readout pulses in time domain measurement. We will also discuss the trajectory measurement where the qubit state is represented on the bloch sphere. We expect the improvement of qubit operation including phase gate fidelity.