Browse Source

Plot analyticals for per-relay total bytes as well

Ian Goldberg 4 years ago
parent
commit
c446242cad
1 changed files with 9 additions and 2 deletions
  1. 9 2
      analysis/plotdats.py

+ 9 - 2
analysis/plotdats.py

@@ -18,6 +18,10 @@ if __name__ == '__main__':
         'vanilla_none': '38.551644414*x + 25316.281696',
     }
 
+    relay_analyticals = {
+        k: '(2500000/6500)*(%s)' % v for k, v in relay_perclient_analyticals.items()
+    }
+
     client_analyticals = {
         'singlepass_merkle': '729.8*ceil(log(x)/log(2)) + 16211.1',
         'singlepass_threshsig': '17261.3000000000',
@@ -37,9 +41,10 @@ if __name__ == '__main__':
         ('client_b', 'Bootstrapping client total bytes', 16, True, None),
         ('client_n', 'Non-bootstrapping client total bytes', 18, True, None),
         ('dirauth_ss', 'Directory authority total bytes each', 20, True, None),
-        ('relay_ss', 'Relay total bytes each', 22, True, None),
+        ('relay_ss', 'Relay total bytes each', 22, True, relay_analyticals),
         ('client_ss', 'Client total bytes each', 24, True, client_analyticals),
         ('relay_perclient_ss', 'Relay total bytes per client', 26, True, relay_perclient_analyticals),
+        ('relay_ss_wide', 'Relay total bytes each', 22, True, relay_analyticals),
         ('client_ss_wide', 'Client total bytes each', 24, True, client_analyticals),
         ('relay_perclient_ss_wide', 'Relay total bytes per client', 26, True, relay_perclient_analyticals),
     ]
@@ -55,7 +60,9 @@ if __name__ == '__main__':
     for filename, title, col, errbars, analyticals in plots:
         if analyticals is None:
             analyticals = dict()
-        if filename[-5:] == '_wide':
+        if filename == 'relay_ss_wide':
+            ranges = "set xrange [300:300000]\nset logscale xy\nset yrange [10000000:]"
+        elif filename[-5:] == '_wide':
             ranges = "set xrange [300:300000]\nset logscale xy\nset yrange [10000:]"
         else:
             ranges = "set xrange [0:2200]\nset yrange [0:]"