Low cost technique for measuring in situ strain of nanostructures