The invention relates to a method and
system for preventing function degradation, and the method comprises the steps: packaging and deploying the latest code of a current
iteration function in an independent environment, completing the automatic construction of the current
iteration function, and carrying out the
automatic testing of an interface of the current
iteration function. The method comprises the steps of calculating
response delay time according to current
response time of an interface and historical
response time of last iteration, judging whether the iteration is abnormal or not according to the
response delay time, judging whether code
rollback needs to be carried out or not through a first model for the abnormal iteration, and directly carrying out code
rollback if the code
rollback needs to be carried out. Therefore, the current iteration function is automatically constructed in the independent environment, it is ensured that follow-up
automatic testing does not affect operation of an original
system, whether code rollback needs to be carried out or not can be further analyzed for abnormal iteration, code rollback can be directly carried out for required iteration, and the efficiency of code rollback is improved. The problem of rapid performance reduction is relieved while the iteration quality is ensured, and rapid iteration development of functions is promoted.