So we are to measure our holiness by works of the law?
There is no definitive article in the Greek in the phrase "works of the law", so it is literally translated, such as in the YLT as "work of law", which means that the phrase does not refer to a definitive set us laws, such the Mosaic law, but rather it was used by Paul as a catch-all phrase to refer to a large body of Jewish oral laws, traditions, rulings, and fences. For example, in Matthew 15:2-3, Jesus was asked why his disciples broke the traditions of the elders and he responded by asking them why they broke the command of God for the sake of their tradition. He went on to say that for the sake of their tradition they made void the Word of God (Matthew 15:6), that they worshiped God in vain because they taught as doctrines the commands of men (Matthew 15:8-9), and that they were hypocrites for setting aside the commands of men in order to establish their own traditions (Mark 7:6-9), so Jesus criticized the Pharisees for not following the Mosaic Law and for instead teaching their own traditions as the Mosaic Law. This means that is critically important to correctly distinguish between between what is said about the Mosaic Law and what is said about man-made works of law that were being taught as the Mosaic Law or else we will not correctly understand what was being said.
However, if your intent was to ask me whether we are to measure our holiness by our obedience to God's Law, then the answer is yes and no. The Law was not given to instruct how to become righteous or holy, but rather it was given to those that God had made righteous and holy as instructions for how to therefore act in accordance with His righteousness and holiness. For example, the Law reveals that helping the poor is acting in accordance with God's righteousness, but no amount of helping the poor will ever cause someone who is not righteous to become righteous because the one and only way that there has ever been to become righteous is by grace through faith, and by the same grace through the same faith we are therefore required to act in accordance with God's righteousness. And the same goes with following God's instructions for how to act in accordance with God's holiness. For example, in 1 Peter 1:13-16, it says that we are to have a holy conduct for God is holy, which is a direct quote from Leviticus, where God was giving instructions for how to have a holy conduct, such as Leviticus 11:44-45, where God revealed that refraining from eating unclean animals is a way to act in accordance with His eternal holiness.
Yet within righteousness a holiness there are also degrees in how closely we measure up to God's standard. For example, in Genesis 36:26, Judah said that Tamar was more righteous than he was, and in 1 Samuel 24:17, Saul said that David was more righteous than he was, so this is in regard more closely acting in accordance with God's righteous standard. In the same way, there were different areas of the temple that had varying degrees of holiness depending on how close they were to the holy of holies. As children of God, we have all been set apart for the purpose of giving glory to God, so we are all holy, yet there are also degrees to which we are dedicated to that purpose. In Titus 2:11-14, it says that our salvation involves being trained by grace to do what is godly, righteous, and good and refrain from doing what is ungodly and sinful, so we are being trained by grace to more closely act in accordance with God's attributes or are being conformed to His image, but this is not work that will be completed until he who began a good work in us is faithful to complete it on the day of Christ Jesus (Philippians 1:6).