How much effort do researchers take to publish their source code? When publishing a paper, some researchers publish the source code used for the paper.

Is there any research/study/survey/... that looked at how much effort do researchers take to publish their source code? I.e. how many hours do researchers take to publish the source code for a given paper?
This isn't a peer-reviewed article, but nonetheless it's worth linking to because it specifically addresses your question, albeit as an n=1 case:

Bruna, E. 2014 THE OPPORTUNITY COST OF MY #OPENSCIENCE WAS 36 HOURS + $690

In this blog post, a biologist Emilio Bruna states it took about 25 hours of his time to appropriately document his code (associated with a research paper) to make it good enough for open source release on github.