Commit cc0b41de authored by Thomas Huetter's avatar Thomas Huetter

fixed plot scripts; and service for plot_exp

parent 83edf441
......@@ -14,7 +14,7 @@
"table_name": "tang_join",
"attributes": [
{
"attr_name": "avg(1.0 - (result_set_size::decimal / NULLIF(verification_candidates::decimal,0)))"
"attr_name": "avg(1.0 - (join_result_size::decimal / NULLIF(verification_candidates::decimal,0)))"
}
],
"name": "$\\mathtt{Tang}$"
......@@ -23,7 +23,7 @@
"table_name": "t_join",
"attributes": [
{
"attr_name": "avg(1.0 - (result_set_size::decimal / NULLIF(verification_candidates::decimal,0)))"
"attr_name": "avg(1.0 - (join_result_size::decimal / NULLIF(verification_candidates::decimal,0)))"
}
],
"name": "$\\mathtt{TJoin}$",
......
......@@ -14,7 +14,7 @@
"table_name": "tang_join",
"attributes": [
{
"attr_name": "avg(1.0 - (result_set_size::decimal / NULLIF(verification_candidates::decimal,0)))"
"attr_name": "avg(1.0 - (join_result_size::decimal / NULLIF(verification_candidates::decimal,0)))"
}
],
"name": "$\\mathtt{Tang}$"
......@@ -23,7 +23,7 @@
"table_name": "t_join",
"attributes": [
{
"attr_name": "avg(1.0 - (result_set_size::decimal / NULLIF(verification_candidates::decimal,0)))"
"attr_name": "avg(1.0 - (join_result_size::decimal / NULLIF(verification_candidates::decimal,0)))"
}
],
"name": "$\\mathtt{TJoin}$",
......
......@@ -14,7 +14,7 @@
"table_name": "t_join",
"attributes": [
{
"attr_name": "avg(1.0 - (result_set_size::decimal / NULLIF(verification_candidates::decimal,0)))"
"attr_name": "avg(1.0 - (join_result_size::decimal / NULLIF(verification_candidates::decimal,0)))"
}
],
"name": "$\\mathtt{TJoin}$",
......
......@@ -14,7 +14,7 @@
"table_name": "tang_join",
"attributes": [
{
"attr_name": "avg(1.0 - (result_set_size::decimal / NULLIF(verification_candidates::decimal,0)))"
"attr_name": "avg(1.0 - (join_result_size::decimal / NULLIF(verification_candidates::decimal,0)))"
}
],
"name": "$\\mathtt{Tang}$"
......@@ -23,7 +23,7 @@
"table_name": "t_join",
"attributes": [
{
"attr_name": "avg(1.0 - (result_set_size::decimal / NULLIF(verification_candidates::decimal,0)))"
"attr_name": "avg(1.0 - (join_result_size::decimal / NULLIF(verification_candidates::decimal,0)))"
}
],
"name": "$\\mathtt{TJoin}$",
......
......@@ -14,7 +14,7 @@
"table_name": "t_join",
"attributes": [
{
"attr_name": "avg(1.0 - (result_set_size::decimal / NULLIF(verification_candidates::decimal,0)))"
"attr_name": "avg(1.0 - (join_result_size::decimal / NULLIF(verification_candidates::decimal,0)))"
}
],
"name": "$\\mathtt{TJoin}$",
......
......@@ -18,7 +18,7 @@
"name": "Candidates"
},
{
"attr_name": "result_set_size",
"attr_name": "join_result_size",
"name": "Join result"
},
{
......
......@@ -18,7 +18,7 @@
"name": "Candidates"
},
{
"attr_name": "result_set_size",
"attr_name": "join_result_size",
"name": "Join result"
},
{
......
......@@ -18,7 +18,7 @@
"name": "Candidates"
},
{
"attr_name": "result_set_size",
"attr_name": "join_result_size",
"name": "Join result"
},
{
......
......@@ -18,7 +18,7 @@
"name": "Candidates"
},
{
"attr_name": "result_set_size",
"attr_name": "join_result_size",
"name": "Join result"
},
{
......
......@@ -18,7 +18,7 @@
"name": "Candidates"
},
{
"attr_name": "result_set_size",
"attr_name": "join_result_size",
"name": "Join result"
},
{
......
......@@ -16,9 +16,9 @@ from psycopg2 import sql
from matplotlib.ticker import EngFormatter
# http://initd.org/psycopg/docs/sql.html#module-psycopg2.sql
def db_request(select_args, table_args, where_args, group_args, order_args):
def db_request(service, select_args, table_args, where_args, group_args, order_args):
# Connect to database.
db = psycopg2.connect("service=ted-join")
db = psycopg2.connect("service=" + service)
# # Open a cursor to perform database operations
cur = db.cursor()
# Build query
......@@ -45,6 +45,8 @@ parser.add_argument("--config", type=str,
help="path to input config file (json")
parser.add_argument("--storeplot", type=str, default="",
help="path and filename where the plot should be stored")
parser.add_argument('--service', type=str, required=True,
help="Service name for db connection. Specify this parameter to store the results in a database.")
args = parser.parse_args()
path, filename = os.path.split(args.config)
......@@ -178,4 +180,4 @@ if args.storeplot != "":
plt.savefig(args.storeplot)
else:
# show the plot
plt.show()
\ No newline at end of file
plt.show()
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