When iam running the test case it will open browser and the process will continue...my task was to get browser performance from developer tool record that performance until the test case run and download it as json file...can anyone help me
There are no details to the setup, but in general:

Take current time after the Test-Setup
Run Test
Take current time before the Test-Teardown
Compute the difference between the times and export it to JSON, database or a monitoring solution.

You could write an abstract test case which implements this and use it for all the tests that require time measurements.
how to fetch browser performance when we run test cases using python