File: ckpov.jgr

package info (click to toggle)
jgraph 83-25
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,008 kB
  • sloc: ansic: 4,596; makefile: 145; sh: 106; awk: 104
file content (69 lines) | stat: -rw-r--r-- 2,020 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
(* This is a pretty ugly file, which prints an overview of checkpointing.
   It's interesting because like diskarray.jgr, it makes use of convert.awk
   to plot disk drives, and computer screens (from srm.awk)
*)


(* Draw the top time line *)

newgraph
xaxis min 0 max 13 size 6 nodraw
yaxis min 0 max 4 size 2.5 nodraw

shell : echo "0 1.5" | awk -f srm.awk
newcurve marktype box fill .8 marksize .8 .7 pts 0.9 3.15

newline linethickness 3 
  pts 2.5 2.5   3.0 3.0   3.5 3.0   4.0 3.2   4.5 3.0   5.0 3.5
      5.5 3.2   6.0 2.7   6.5 2.8   7.0 2.5   7.5 2.8   8.0 3.2
      8.5 2.9   9.0 3.1   9.5 2.8   10.0 2.7
newline linethickness 3 rarrows asize .3 .2 pts 10.0 2.7   10.5 2.5

shell : echo "11 1.5" | awk -f srm.awk


(* Draw the middle time line, with checkpoints and a failure *)

copygraph
y_translate -2.2

shell : echo "0 1.5" | awk -f srm.awk
newcurve marktype box fill .8 marksize .8 .7 pts 0.9 3.15

newline linethickness 3 
  pts 2.5 2.5   3.0 3.0   3.5 3.0   4.0 3.2   4.5 3.0   5.0 3.5
      5.5 3.2   6.0 2.7   6.5 2.8   7.0 2.5   7.5 2.8   8.0 3.2
newline linethickness 3 rarrows asize .3 .2 pts 8.0 3.2   8.5 2.9
newstring x 8.8 y 2.9 hjl vjc fontsize 14 : Failure

newline rarrows pts 3.5 3.0  3.4 1.6
shell : echo "3.2 1.1" | awk -f disk.awk

newline rarrows pts 5.5 3.2  5.4 1.6
shell : echo "5.2 1.1" | awk -f disk.awk

newline rarrows pts 7.5 2.8  7.4 1.6
shell : echo "7.2 1.1" | awk -f disk.awk

newstring x 5.5 y 4.5 fontsize 12 hjc vjb : Checkpoints
newline rarrows pts 5.5 4.3 3.6 3.2
newline rarrows pts 5.5 4.3 5.5 3.4
newline rarrows pts 5.5 4.3 7.4 3.0


(* Draw the bottom time line, which recovers from the checkpoint *)

copygraph
y_translate -4.4

newline linethickness 3 
  pts 7.5 2.8   8.0 3.2   8.5 2.9   9.0 3.1   9.5 2.8   10.0 2.7
newline linethickness 3 rarrows asize .3 .2 pts 10.0 2.7   10.5 2.5

shell : echo "11 1.5" | awk -f srm.awk

newline larrows pts 7.5 2.7  7.4 1.6
shell : echo "7.2 1.2" | awk -f disk.awk

newstring fontsize 12 hjr vjc x 7.3 y 2.8 : Recover