Commit e6736688 by Nagy Gergő

Fixed test code formatting

parent 76948cf4
......@@ -6,16 +6,16 @@ server_port = "8080"
query = Query()
query.setTarget("1889.foo.fook.fookie.com.DOMAIN")
query.setMetric("cpu.usage")
query.setFormat("json") # Not neccesary, default is json
query.setRelativeStart(1, "minutes") # Current cpu usage
query.setFormat("json") #Not neccesary, default is json
query.setRelativeStart(1, "minutes") #Current cpu usage
query.generate()
# print(query.getGenerated())
#print(query.getGenerated())
print(query.getStart())
# query.setAbsoluteStart("1889", "04", "20", "00", "00")
# query.setRelativeEnd(...)
# query.setAbsoluteEnd(...)
#query.setAbsoluteStart("1889", "04", "20", "00", "00")
#query.setRelativeEnd(...)
#query.setAbsoluteEnd(...)
handler = GraphiteHandler(server_name, server_port)
......@@ -25,5 +25,3 @@ response = handler.pop()
print(response["target"])
print(response["datapoints"])
......@@ -12,7 +12,7 @@ handler = GraphiteHandler("10.9.1.209")
times = int(input("How many requests do you intend to send? [postive integer] "))
global_start = datetime.datetime.now()
for i in range (1,times):
for i in range(1, times):
local_start = datetime.datetime.now()
handler.put(query)
handler.send()
......@@ -24,5 +24,5 @@ print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*")
print("Summary:")
print(global_end - global_start)
print("AVG:")
print((global_end -global_start) / times)
print((global_end - global_start) / times)
print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*")
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 sign in to comment