hpi-epic / pricewars

Price Wars - A Simulation Platform for Dynamic Pricing Competition
https://hpi.de/en/plattner/projects/price-wars-an-interactive-simulation-platform.html
MIT License
52 stars 24 forks source link

Graph for total profit #26

Closed CarstenWalther closed 6 years ago

CarstenWalther commented 6 years ago

The benchmark script now generates a graph of the total profit.

Do you want a graph for total revenue? We need a new kafka topic for that.

Example: profit

CarstenWalther commented 6 years ago

I renamed the label to 'Cumulative Profit'. Adding the cumulative revenue topic shouldn't take too long, but I need to touch a Flink job.

Bouncner commented 6 years ago

Should I merge before or after the flink job?

CarstenWalther commented 6 years ago

If you merge the Flink Job first, I could add the revenue graph in this PR.

CarstenWalther commented 6 years ago
CarstenWalther commented 6 years ago

I added cumulative revenue graphs. This can be used as soon as the new kafka topic is available.

Example: cumulative_revenue

Bouncner commented 6 years ago

Ok, looks good. Can I merge?

Bouncner commented 6 years ago

I get the following error (I've pull and rebuilt the analytics image):

Traceback (most recent call last):
  File "/home/Martin.Boissier/pricewars/helper_scripts/benchmark.py", line 178, in <module>
    main()
  File "/home/Martin.Boissier/pricewars/helper_scripts/benchmark.py", line 174, in main
    analyze_kafka_dump(output_dir)
  File "/home/Martin.Boissier/pricewars/helper_scripts/analyze.py", line 62, in analyze_kafka_dump
    topic='cumulativeRevenue', value_name='revenue', label='Cumulative Revenue', filename='cumulative_revenue.png')
  File "/home/Martin.Boissier/pricewars/helper_scripts/analyze.py", line 76, in create_chart
    events = json.load(open(os.path.join(directory, 'kafka', topic)))
FileNotFoundError: [Errno 2] No such file or directory: '/home/Martin.Boissier/results/2018-07-06T22-24-41/kafka/cumulativeRevenue'