GOD KNOWS EVERYTHING, Including those who would not count the cost involved, and every decision one would make, before the beginning of time.
Perhaps you can find your answer in this verses:
1 Corinthians 3:12-15 (ESV)
12 Now if anyone builds on the foundation with gold, silver, precious stones, wood, hay, straw—
13 each one’s work will become manifest, for the Day will disclose it, because it will be revealed by fire, and the fire will test what sort of work each one has done.
14 If the work that anyone has built on the foundation survives, he will receive a reward.
15 If anyone’s work is burned up, he will suffer loss, though he himself will be saved, but only as through fire.
1 Chronicles 28:9 (ESV)
9 “And you, Solomon my son, know the God of your father and serve him with a whole heart and with a willing mind, for the LORD searches all hearts and understands every plan and thought. If you seek him, he will be found by you, but if you forsake him, he will cast you off forever.