code: def save_data(self):
          
          title = _( "Save profiler result")
          filename, _selfilter = getsavefilename(
                  self, title, getcwd_or_home(),
                  _("Profiler result")+" (*.Result)")
          if filename:
              self.datatree.save_data(filename)
docs: Save data