Process PGNs server side upon upload
Requires completion of https://github.com/AndyGrant/OpenBench/issues/157 Requires completion of https://github.com/AndyGrant/OpenBench/issues/158
Imagine a PGN model like:
class PGN(model.Model):
test_id = IntegerField(default=0)
result_id = IntegerField(default=0)
seed = BigIntegerField(default=0)
creation = DateTimeField(auto_now_add=True)
statistics = JSONField(default=dict)
Upon uploading, we spawn a thread to do analysis of the PGN. For now, we can imagine simply tracking the NPS of the engine. What we can do is decompress the PGN, iterate over the game, and collect data. This will only be done on type-I pgns, which contain additional information...
Sum up all time spent, and all nodes searched, to create two fields for each engine in the statistics JSONField. dev_nodes, base_nodes, dev_time, base_time. We crunch this data just once. Then in some view, we are able to ask the server to collect data from all tests. We can display these values per workload, per machine, and in total. This will allow us to identify speedups. This will allow us to identify outlier machines if there were to be some bug.
We can further extend this initial post-processing to handle things like Finny's graphing utility, which graphs depth/seldepth/nps as a function of ply.