Of course don’t just ask the engineer. Any piece of code written by the engineer should ultimately be tested by a separate testing team before getting pushed to production. Ideally you have a performance and regression testing team that would help evaluate the changes being introduced and how it compares with the existing.
It isn’t enough to detect deliberate lies from an engineer like in this case.
There are ways to know. Did the manager ask for proof of concept? Asked for performance tests of the update and compared it to existing/baseline?
How can I know? Plus engineer could easily lie as he did it right from the start.
Of course don’t just ask the engineer. Any piece of code written by the engineer should ultimately be tested by a separate testing team before getting pushed to production. Ideally you have a performance and regression testing team that would help evaluate the changes being introduced and how it compares with the existing.