tls – Calculate requests/response size without having the proxy server certificate installed

I am developing a proxy server that uses an upstream proxy.

I need to know the total size of the requests/responses without the client having the ssl certificate of the proxy server installed and without it being warning on his browser.

I would like to know what would be the best way to know the size as accurately as possible.