Commit f78931b2 authored by KOMAL BADI's avatar KOMAL BADI
Browse files

Added additional documentations and seperated the throughput analysis plots.

parent dafac808
......@@ -45,16 +45,6 @@
"Initially, array job id that require analysis is assigned to a varaiable, further we'll be using this id to do the analysis "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#Enter the JobID for which you want to do throughput analysis \n",
"array_job_id='5976984'"
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -66,6 +56,16 @@
"2) seaborn , matplotlib, RC_STYLES.rc_styles for visualization"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#Enter the JobID for which you want to do throughput analysis \n",
"array_job_id='5976984'"
]
},
{
"cell_type": "code",
"execution_count": null,
......@@ -147,8 +147,11 @@
"metadata": {},
"outputs": [],
"source": [
"\n",
"#Filtering data by removing batch and extern columns from dataframe. \n",
"df= df.loc[df['JobName'] =='R_array_job']"
"df= df.loc[df['JobName'] =='R_array_job']\n",
"#Total array tasks\n",
"Total_Jobs_Submitted = 50"
]
},
{
......@@ -508,7 +511,7 @@
"#pending jobs are calculated as difference between \n",
"#total jobs submitted at a particular time \n",
"#and Jobs that have been started.\n",
"Total_Jobs_Submitted = 50\n",
"\n",
"running_df['pending_jobs'] = Total_Jobs_Submitted - running_df['running']"
]
},
......@@ -728,6 +731,70 @@
"plt.xlabel('Time')\n",
"plt.ylabel('Job_Count')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# create figure and axis objects with subplots()\n",
"fig,ax = plt.subplots(figsize=(15,5))\n",
"# make a plot\n",
"ax.plot(q.pending_jobs, color=\"red\")\n",
"# set x-axis label\n",
"ax.set_xlabel(\"time\",fontsize=14)\n",
"# set y-axis label\n",
"ax.set_ylabel(\"Pending job count\",color=\"red\",fontsize=14)\n",
"# twin object for two different y-axis on the sample plot\n",
"ax2=ax.twinx()\n",
"# make a plot with different y-axis using second axis object\n",
"ax2.plot(q.currently_running,color=\"blue\")\n",
"ax2.set_ylabel(\"Currently running job Count\",color=\"blue\",fontsize=14)\n",
"plt.title('Throughput Analysis')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"figure,axes = plt.subplots(1, 2)\n",
"currently_running_plot=q['currently_running'].plot(figsize=(15,5),ax=axes[0],color=\"blue\")\n",
"pending_jobs_plot=q['pending_jobs'].plot(figsize=(15,5),ax=axes[1],color=\"red\")\n",
"currently_running_plot.set_ylabel('Job_Count')\n",
"currently_running_plot.set_title('Currently running jobs')\n",
"currently_running_plot.set_xlabel('Time')\n",
"pending_jobs_plot.set_ylabel('Job_Count')\n",
"pending_jobs_plot.set_xlabel('Time')\n",
"pending_jobs_plot.set_title('Pending jobs')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"s.default_axes_and_ticks()\n",
"g = sns.FacetGrid(q)\n",
"#g.fig.suptitle('Pascalnode Partition',fontsize=20,horizontalalignment='left', verticalalignment='top')\n",
"g.map(plt.scatter, \"currently_running\", edgecolor=\"w\",linewidth=.0).add_legend()\n",
"g.fig.set_figheight(30)\n",
"g.fig.set_figwidth(30)\n",
"plt.subplots_adjust(top=0.9)\n",
"g.fig.suptitle('Pascalnnode Partition',fontsize=20)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment