update qps algorithm