code: private Object wrapDriverInProfilingProxy(Object newDriverInstance) {
  
          Class<?> cls = getDriverInterfaceForProxy(newDriverInstance);
          if (cls == null) {
              return newDriverInstance;
          }
          return Proxy.newProxyInstance(
              Thread.currentThread().getContextClassLoader(),
              new Class[] {cls},
              new CmsProfilingInvocationHandler(newDriverInstance, CmsDefaultProfilingHandler.INSTANCE));
      }
docs: Wraps a driver object with a dynamic proxy that counts method calls and their durations.<p>
  
  @param newDriverInstance the driver instance to wrap
  @return the proxy