Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / qa / workunits / erasure-code / plot.js
1 $(function() {
2     encode = [];
3     if (typeof encode_vandermonde_isa != 'undefined') {
4         encode.push({
5             data: encode_vandermonde_isa,
6             label: "ISA, Vandermonde",
7             points: { show: true },
8             lines: { show: true },
9         });
10     }
11     if (typeof encode_vandermonde_jerasure != 'undefined') {
12         encode.push({
13             data: encode_vandermonde_jerasure,
14             label: "Jerasure Generic, Vandermonde",
15             points: { show: true },
16             lines: { show: true },
17         });
18     }
19     if (typeof encode_cauchy_isa != 'undefined') {
20         encode.push({
21             data: encode_cauchy_isa,
22             label: "ISA, Cauchy",
23             points: { show: true },
24             lines: { show: true },
25         });
26     }
27     if (typeof encode_cauchy_jerasure != 'undefined') {
28         encode.push({
29             data: encode_cauchy_jerasure,
30             label: "Jerasure, Cauchy",
31             points: { show: true },
32             lines: { show: true },
33         });
34     }
35     $.plot("#encode", encode, {
36         xaxis: {
37             mode: "categories",
38             tickLength: 0
39         },
40     });
41
42     decode = [];
43     if (typeof decode_vandermonde_isa != 'undefined') {
44         decode.push({
45             data: decode_vandermonde_isa,
46             label: "ISA, Vandermonde",
47             points: { show: true },
48             lines: { show: true },
49         });
50     }
51     if (typeof decode_vandermonde_jerasure != 'undefined') {
52         decode.push({
53             data: decode_vandermonde_jerasure,
54             label: "Jerasure Generic, Vandermonde",
55             points: { show: true },
56             lines: { show: true },
57         });
58     }
59     if (typeof decode_cauchy_isa != 'undefined') {
60         decode.push({
61             data: decode_cauchy_isa,
62             label: "ISA, Cauchy",
63             points: { show: true },
64             lines: { show: true },
65         });
66     }
67     if (typeof decode_cauchy_jerasure != 'undefined') {
68         decode.push({
69             data: decode_cauchy_jerasure,
70             label: "Jerasure, Cauchy",
71             points: { show: true },
72             lines: { show: true },
73         });
74     }
75     $.plot("#decode", decode, {
76         xaxis: {
77             mode: "categories",
78             tickLength: 0
79         },
80     });
81
82 });