How To print content of STAT Pointers

Hey, guys was working on a way to log the frame sync time to create an automation tool does any one have any Idea how we can log the STAT_ptr so unreal has these stat pointers for each stat that u see on the screen like Frame Time, GPU Time, etc similarly there is a pointer called STAT_FrameSyncTime not able to find a way to read theis pointer.

This is the closest I’ve been able to come to but still I am not getting the right values its always printing 0

AsyncTask(FPlatformProcess::SupportsMultithreading() ? ENamedThreads::StatsThread : ENamedThreads::GameThread, [this]()
    {
        if (FThreadStats::IsCollectingData())
        {
            FStatsThreadState& StatsState = FStatsThreadState::GetLocalState();
            int64 LatestFrame = StatsState.GetLatestValidFrame();
            if (StatsState.IsFrameValid(LatestFrame))
            {
                if (auto Messages = StatsState.ShortNameToLongName.Find(FName("STAT_FrameSyncTime")))
                {

                    // Do something with the stat value (e.g., print it, log it, etc.)

                    UE_LOG(LogTemp, Log, TEXT("STAT_FrameSyncTime Value: %s"), FStatsUtils::DebugPrint(Messages));
                }
            }
        }
    });

If anybody has any Idea about this, then that will be a great help