Text this: Optimization of discrete structure of electrospark coatings