Commit f781cf48 authored by 高雅喆's avatar 高雅喆

change path

parent b337a496
......@@ -4,17 +4,17 @@ import time
import sys
OUTPUT_PATH = "/data2/models/eda/node2vec/"
OUTPUT_PATH = "/data2/models/eda/gray_stat/"
num = sys.argv[1]
if num == "3|4":
OUTPUT_PATH = "/data2/models/eda/node2vec/3|4"
OUTPUT_PATH = "/data2/models/eda/gray_stat/3|4"
table_name = "jerry_prod.nd_device_cid_similarity_matrix_tmp"
elif num == "5|6":
OUTPUT_PATH = "/data2/models/eda/node2vec/5|6"
OUTPUT_PATH = "/data2/models/eda/gray_stat/5|6"
table_name = "eagle.ffm_diary_queue_temp"
elif num == "7|8":
OUTPUT_PATH = "/data2/models/eda/node2vec/7|8"
OUTPUT_PATH = "/data2/models/eda/gray_stat/7|8"
table_name = "eagle.search_queue"
else:
print("参数必须是 '3|4' 或 '5|6' 或 '7|8'")
......@@ -125,15 +125,16 @@ def main():
output = OUTPUT_PATH + "ctr.csv"
with open(output,"a+") as f:
print("stat" + " " + get_yesterday_date())
g_class = GrayStat("diary",num)
a_class = AllStat("diary",num)
line1 = str(g_class.get_uid_count())+"\t"+str(g_class.get_uid_imp_times())+"\t"+str(g_class.get_uid_clk_times())
line2 = str(a_class.get_uid_count())+"\t"+str(a_class.get_uid_imp_times())+"\t"+str(a_class.get_uid_clk_times())
g_class = GrayStat("diary","3|4")
a_class = AllStat("diary","3|4")
line1 = str(g_class.get_uid_count())+","+str(g_class.get_uid_imp_times())+","+str(g_class.get_uid_clk_times())
line2 = str(a_class.get_uid_count())+","+str(a_class.get_uid_imp_times())+","+str(a_class.get_uid_clk_times())
g_ctr = g_class.get_uid_clk_times()/g_class.get_uid_imp_times()
a_ctr = a_class.get_uid_clk_times()/a_class.get_uid_imp_times()
growth_rate = (g_ctr-a_ctr)/a_ctr
line = get_yesterday_date() + "\t" + str(round(g_ctr*100,2))+'%' + "\t" + str(round(a_ctr*100,2))+'%' + "\t" + \
str(round(growth_rate*100,2))+'%' + "\t" + line1 + "\t" + line2 + "\n"
coverage_rate = g_class.get_uid_count()/a_class.get_uid_count()
line = get_yesterday_date() + "," + str(round(g_ctr*100,2))+'%' + "," + str(round(a_ctr*100,2))+'%' + "," + \
str(round(growth_rate*100,2))+'%' + "," + line1 + "," + line2 + "," + str(round(coverage_rate*100,2)) + "%" + "\n"
f.write(line)
......
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