Pulling Performance data from Mobile devices using APPIUM

Hi Team,

Im trying to pull performance data from mobile devices using appium. But im getting below error . Please have a look into the issue.

Exception in thread “main” java.lang.ClassCastException: io.appium.java_client.AppiumDriver cannot be cast to io.appium.java_client.android.HasSupportedPerformanceDataType
at tests.AppiumTest.(AppiumTest.java:79)
at tests.AppiumTest.main(AppiumTest.java:90)

Please post the the test code.