Example #1
0
def round_to_str(value , to=3):
	"""
Utility method for rounding the float value to rounded string
@param value :  value to round
@param to    :  how many decimal points to round to
	"""
	return stats_utils.round_decimal_to_str(value,to)
Example #2
0
	def get_formatted_invocations_over_time_metadata(self , date_time_filter):
		"""
		Returns formatted invocations over time metadata.
		@param date_time_filter date time filter
		"""
		invs_over_time_list = self.wf_invocations_over_time_statistics[date_time_filter]
		max_count, max_runtime =  self.get_max_count_run_time(False, date_time_filter)
		inv_info = ''
		inv_info +=("{")
		inv_info +=( "\n")
		inv_info += ( "\"num\":"  + "\"" + str(len(invs_over_time_list))+ "\" , ")
		inv_info += ( "\"max_count\":" +  str(max_count) +" , ")
		inv_info += ( "\"max_runtime\":" +  plot_utils.round_decimal_to_str(max_runtime) +"  ")
		inv_info +=( "},\n")
		return inv_info
Example #3
0
	def get_formatted_invocations_over_time_data(self , date_time_filter):
		"""
		Returns formatted invocations over time  data.
		@param date_time_filter date time filter
		"""
		invs_over_time_list = self.wf_invocations_over_time_statistics[date_time_filter]
		inv_info = ''
		for inv_stat in invs_over_time_list:
			inv_info +=("{")
			inv_info +=( "\n")
			inv_info += ( "\"datetime\":"  + "\"" + inv_stat[0] + "\" , ")
			inv_info += ( "\"count\":" +  str(inv_stat[1]) +" , ")
			inv_info += ( "\"runtime\":" +  plot_utils.round_decimal_to_str(inv_stat[2]) +"  ")
			inv_info +=( "},\n")
		return inv_info
Example #4
0
	def get_formatted_job_instances_over_time_metadata(self , date_time_filter):
		"""
		Returns formatted job instances over time metadata.
		@param date_time_filter date time filter
		"""
		job_instance_over_time_list = self.wf_job_instances_over_time_statistics[date_time_filter]
		max_count, max_runtime =  self.get_max_count_run_time(True, date_time_filter)
		job_info = ''
		job_info +=("{")
		job_info +=( "\n")
		job_info += ( "\"num\":"  + "\"" + str(len(job_instance_over_time_list))+ "\" , ")
		job_info += ( "\"max_count\":" +  str(max_count) +" , ")
		job_info += ( "\"max_runtime\":" +  plot_utils.round_decimal_to_str(max_runtime) +"  ")
		job_info +=( "},\n")
		return job_info
Example #5
0
	def get_formatted_job_instances_over_time_data(self , date_time_filter):
		"""
		Returns formatted job instance over time data.
		@param date_time_filter date time filter
		"""
		job_instance_over_time_list = self.wf_job_instances_over_time_statistics[date_time_filter]
		job_info = ''
		for job_stat in job_instance_over_time_list:
			job_info +=("{")
			job_info +=( "\n")
			job_info += ( "\"datetime\":"  + "\"" + job_stat[0]+ "\" , ")
			job_info += ( "\"count\":" +  str(job_stat[1]) +" , ")
			job_info += ( "\"runtime\":" +  plot_utils.round_decimal_to_str(job_stat[2]) +"  ")
			job_info +=( "},\n")
		return job_info
Example #6
0
	def get_formatted_invocations_over_time_metadata(self , date_time_filter):
		"""
		Returns formatted invocations over time metadata.
		@param date_time_filter date time filter
		"""
		invs_over_time_list = self.wf_invocations_over_time_statistics[date_time_filter]
		max_count, max_runtime =  self.get_max_count_run_time(False, date_time_filter)
		inv_info = ''
		inv_info +=("{")
		inv_info +=( "\n")
		inv_info += ( "\"num\":"  + "\"" + str(len(invs_over_time_list))+ "\" , ")
		inv_info += ( "\"max_count\":" +  str(max_count) +" , ")
		inv_info += ( "\"max_runtime\":" +  plot_utils.round_decimal_to_str(max_runtime) +"  ")
		inv_info +=( "},\n")
		return inv_info
Example #7
0
	def get_formatted_job_instances_over_time_metadata(self , date_time_filter):
		"""
		Returns formatted job instances over time metadata.
		@param date_time_filter date time filter
		"""
		job_instance_over_time_list = self.wf_job_instances_over_time_statistics[date_time_filter]
		max_count, max_runtime =  self.get_max_count_run_time(True, date_time_filter)
		job_info = ''
		job_info +=("{")
		job_info +=( "\n")
		job_info += ( "\"num\":"  + "\"" + str(len(job_instance_over_time_list))+ "\" , ")
		job_info += ( "\"max_count\":" +  str(max_count) +" , ")
		job_info += ( "\"max_runtime\":" +  plot_utils.round_decimal_to_str(max_runtime) +"  ")
		job_info +=( "},\n")
		return job_info
Example #8
0
	def get_formatted_invocations_over_time_data(self , date_time_filter):
		"""
		Returns formatted invocations over time  data.
		@param date_time_filter date time filter
		"""
		invs_over_time_list = self.wf_invocations_over_time_statistics[date_time_filter]
		inv_info = ''
		for inv_stat in invs_over_time_list:
			inv_info +=("{")
			inv_info +=( "\n")
			inv_info += ( "\"datetime\":"  + "\"" + inv_stat[0] + "\" , ")
			inv_info += ( "\"count\":" +  str(inv_stat[1]) +" , ")
			inv_info += ( "\"runtime\":" +  plot_utils.round_decimal_to_str(inv_stat[2]) +"  ")
			inv_info +=( "},\n")
		return inv_info
Example #9
0
	def get_formatted_job_instances_over_time_data(self , date_time_filter):
		"""
		Returns formatted job instance over time data.
		@param date_time_filter date time filter
		"""
		job_instance_over_time_list = self.wf_job_instances_over_time_statistics[date_time_filter]
		job_info = ''
		for job_stat in job_instance_over_time_list:
			job_info +=("{")
			job_info +=( "\n")
			job_info += ( "\"datetime\":"  + "\"" + job_stat[0]+ "\" , ")
			job_info += ( "\"count\":" +  str(job_stat[1]) +" , ")
			job_info += ( "\"runtime\":" +  plot_utils.round_decimal_to_str(job_stat[2]) +"  ")
			job_info +=( "},\n")
		return job_info