Influence of sample deformation and porosity on mechanical properties by instrumented microindentation technique