single_php_filehost icon indicating copy to clipboard operation
single_php_filehost copied to clipboard

file retention graph

Open pcroland opened this issue 4 years ago • 7 comments

Hi!

I created a graph for file retention:

360 days ─┬┬────────────────────────────┬─────────────────────────────┐
          │└┐                           │                             │
          │ └┐                          │                             │
          │  └┐                         │                             │
          │   └┐                        │                             │
          │    └┐                       │                             │
          │     └┐                      │                             │
          │      └┐                     │                             │
          │       └┐                    │                             │
          │        └┐                   │                             │
          │         └─┐                 │                             │
          │           └┐                │                             │
          │            └┐               │                             │
          │             └─┐             │                             │
          │               └┐            │                             │
185 days ─┼────────────────┴┬───────────┼─────────────────────────────┤
          │                 └─┐         │                             │
          │                   └─┐       │                             │
          │                     └┐      │                             │
          │                      └─┐    │                             │
          │                        └┐   │                             │
          │                         └─┐ │                             │
          │                           └─┤                             │
          │                             ├─┐                           │
          │                             │ └──┐                        │
          │                             │    └─┐                      │
          │                             │      └──┐                   │
          │                             │         └──┐                │
          │                             │            └───┐            │
          │                             │                └─────┐      │
 10 days ─┼─────────────────────────────┼──────────────────────┴──────┤
         0MB                          512MB                        1024MB```
Feel free to merge it somewhere in the php if you want.

pcroland avatar Apr 09 '20 23:04 pcroland

Neat! Did you manually draw that? To actually merge that in I'd probably want it generated based on the settings inside the .php somehow

Rouji avatar Apr 10 '20 13:04 Rouji

I generated the graph in excel, then manually draw it, yes: https://widevine.is-a.fail/lS9ZXN.png

pcroland avatar Apr 10 '20 14:04 pcroland

Can't really put it in the repo as the static thing that it is, but I've put it on x0.at for now anyway. Looks good on desktop browsers and iOS (maybe a bit large), but somehow goes weird on Android, even inside the <pre>, so it still needs some fiddling though :/

tMV

I guess generating a simple SVG might do the trick for a dynamic graph that looks the same everywhere. But someone would have to be very bored to implement that.

Rouji avatar Apr 10 '20 15:04 Rouji

Just changing the graph values based on the settings should be okay I guess. The slope won't change unless you change the formula.

pcroland avatar Apr 12 '20 19:04 pcroland

The exponent is configurable and will indeed change the slope.

Rouji avatar Apr 12 '20 21:04 Rouji

+1 for merging

koutsie avatar Apr 04 '21 18:04 koutsie

+1 for merging

A static graph does not work for the general case, where the exponent is configurable. Simple example: it's a straight line for $DECAY_EXP=1

Rouji avatar Apr 04 '21 18:04 Rouji