This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmp = dat_clean | |
tmp = tmp[tmp['host'] == domain] | |
tmp = tmp.groupby(['cdn-cache','ext']).size().reset_index(name='Count') | |
tmp = tmp.reset_index().pivot(columns='ext', index='cdn-cache', values='Count') | |
tmp.plot.bar(); | |
plt.title('Cache Status by ext') | |
plt.xlabel('Domain/Ext') | |
plt.ylabel('Count') | |
plt.show() | |
del tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmp = dat_clean | |
tmp = tmp[tmp['host'] == domain] | |
tmp = tmp.groupby(['cdn-cache']).size().reset_index(name='Count') | |
plt.pie(tmp['Count'],shadow=False,autopct='%1.1f%%') | |
plt.legend( tmp['cdn-cache'], loc="best") | |
plt.title('Cache Status') | |
plt.axis('equal') | |
plt.tight_layout() | |
plt.show() | |
del tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmp = dat_clean | |
tmp = tmp[tmp['host-type'] == 'First Party'] | |
tmp = tmp[tmp['ext'].isin(['css','js'])] | |
tmp = tmp[["ext", "content-length","content-length-origin"]] | |
tmp = tmp.groupby('ext')["content-length","content-length-origin"].mean().reset_index() | |
tmp.plot(x="ext", kind="bar",label=['RO','RAW']) | |
plt.title('First Party Resource Optimizer content-length vs Origin') | |
plt.xlabel('Extensions') | |
plt.ylabel('Bytes') | |
plt.legend(["RO", "Origin"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmp = dat_clean | |
tmp = tmp[tmp['host'] == domain] | |
tmp = tmp.groupby('ext')[ "send", "ttfb", "receive"].mean().reset_index() | |
tmp[["ext", "send", "ttfb", "receive"]].plot(x="ext", kind="bar", stacked=True,label='Series') | |
plt.title(domain+': Timing by Ext') | |
plt.xlabel('Extensions') | |
plt.ylabel('Milliseconds') | |
plt.show() | |
del tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmp = dat_clean | |
tmp = tmp[tmp['host-type'] == 'First Party'] | |
tmp = tmp.groupby(['host','ext']).size().reset_index(name='Count') | |
tmp = tmp.reset_index().pivot(columns='ext', index='host', values='Count') | |
tmp.plot.bar(); | |
plt.title('Extensions by Domain') | |
plt.xlabel('Domain/Ext') | |
plt.ylabel('Count') | |
plt.show() | |
del tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmp = dat_clean | |
tmp = tmp.groupby(['host','status']).size().reset_index(name='Count') | |
tmp = tmp.reset_index().pivot(columns='status', index='host', values='Count') | |
tmp.plot.bar(); | |
plt.title('HTTP Status by Domain') | |
plt.xlabel('Count') | |
plt.ylabel('Domain') | |
plt.show() | |
del tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmp = dat_clean | |
tmp = tmp.groupby(['status']).size().reset_index(name='Count') | |
tmp = tmp.sort_values(by=['Count'],ascending=False) | |
plt.pie(tmp['Count'],labels=tmp['status'],shadow=False,autopct='%1.1f%%') | |
plt.title('HTTP Response Codes') | |
plt.axis('equal') | |
plt.tight_layout() | |
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmp = dat_clean | |
tmp = tmp[tmp['host-type'] == 'Third Party'] | |
tmp = tmp.groupby('host')[ "content-length"].mean().reset_index() | |
tmp[["host", "content-length"]].plot(x="host", kind="bar", stacked=True,label='Series') | |
plt.title('Third Party by Content Size') | |
plt.xlabel('Domains') | |
plt.ylabel('Content Length') | |
plt.show() | |
del tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmp = dat_clean | |
tmp = tmp[tmp['host-type'] == 'Third Party'] | |
tmp = tmp.groupby('host').size().reset_index(name='Count').plot(x="host", kind="bar", stacked=True,label='Series') | |
plt.title('Third Party by Requests') | |
plt.xlabel('Domain') | |
plt.ylabel('Requests') | |
plt.show() | |
del tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmp = dat_clean | |
tmp = tmp[["host","method"]] | |
tmp = tmp.groupby(['host','method']).size().reset_index(name='Count') | |
tmp = tmp.reset_index().pivot(columns='method', index='host', values='Count') | |
tmp.plot.bar(); | |
plt.title('Method by Domain') | |
plt.xlabel('Domains') | |
plt.ylabel('Count') | |
plt.show() | |
del tmp |
NewerOlder