Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.80 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Alipay stresstest report</title>
  4. <link rel="stylesheet" href="static/css/bootstrap.min.css"/>
  5. <link rel="stylesheet" href="static/css/bootstrap-sortable.css"/>
  6. <style>
  7. #page {
  8. width: 1200px;
  9. margin: auto;
  10. }
  11.  
  12. th {
  13. text-align: center;
  14. vertical-align: middle;
  15. }
  16.  
  17. td {
  18. text-align: right;
  19. vertical-align: middle;
  20. }
  21.  
  22. .text {
  23. text-align: left;
  24. }
  25. </style>
  26.  
  27. <script src="static/js/jquery.min.js"></script>.
  28. <script src="static/js/bootstrap-sortable.js"></script>
  29. <script>
  30. var reportJson = [ {
  31. "name" : "root",
  32. "count" : 1,
  33. "success" : 1,
  34. "failed" : 0,
  35. "minExecutionTime" : 1868,
  36. "maxExecutionTime" : 1868,
  37. "lastExecutionTIme" : 1868,
  38. "median" : 1868.0
  39. }, {
  40. "name" : "AlipayStressCase",
  41. "count" : 1,
  42. "success" : 1,
  43. "failed" : 0,
  44. "minExecutionTime" : 1269,
  45. "maxExecutionTime" : 1269,
  46. "lastExecutionTIme" : 1269,
  47. "median" : 1269.0
  48. }, {
  49. "name" : "AlipayMainSuiteCase",
  50. "count" : 1,
  51. "success" : 1,
  52. "failed" : 0,
  53. "minExecutionTime" : 1258,
  54. "maxExecutionTime" : 1258,
  55. "lastExecutionTIme" : 1258,
  56. "median" : 1258.0
  57. }, {
  58. "name" : "AlipayMainSuiteCase::AlipayDepositSuiteCase",
  59. "count" : 1,
  60. "success" : 1,
  61. "failed" : 0,
  62. "minExecutionTime" : 945,
  63. "maxExecutionTime" : 945,
  64. "lastExecutionTIme" : 945,
  65. "median" : 945.0
  66. }, {
  67. "name" : "AlipayDepositSuiteCase::AlipayInstantPaymentPreAuthCase",
  68. "count" : 1,
  69. "success" : 1,
  70. "failed" : 0,
  71. "minExecutionTime" : 608,
  72. "maxExecutionTime" : 608,
  73. "lastExecutionTIme" : 608,
  74. "median" : 608.0
  75. }, {
  76. "name" : "AlipayDepositSuiteCase::AlipayOrderStatusCase",
  77. "count" : 2,
  78. "success" : 2,
  79. "failed" : 0,
  80. "minExecutionTime" : 107,
  81. "maxExecutionTime" : 124,
  82. "lastExecutionTIme" : 107,
  83. "median" : 115.5
  84. }, {
  85. "name" : "AlipayDepositSuiteCase::AlipayDepositCase",
  86. "count" : 1,
  87. "success" : 1,
  88. "failed" : 0,
  89. "minExecutionTime" : 101,
  90. "maxExecutionTime" : 101,
  91. "lastExecutionTIme" : 101,
  92. "median" : 101.0
  93. }, {
  94. "name" : "AlipayMainSuiteCase::AlipayPaymentPurchaseSuiteCase",
  95. "count" : 1,
  96. "success" : 1,
  97. "failed" : 0,
  98. "minExecutionTime" : 311,
  99. "maxExecutionTime" : 311,
  100. "lastExecutionTIme" : 311,
  101. "median" : 311.0
  102. }, {
  103. "name" : "AlipayPaymentPurchaseSuiteCase::AlipayInstantPaymentPurchaseCase",
  104. "count" : 1,
  105. "success" : 1,
  106. "failed" : 0,
  107. "minExecutionTime" : 208,
  108. "maxExecutionTime" : 208,
  109. "lastExecutionTIme" : 208,
  110. "median" : 208.0
  111. }, {
  112. "name" : "AlipayPaymentPurchaseSuiteCase::AlipayOrderStatusCase",
  113. "count" : 1,
  114. "success" : 1,
  115. "failed" : 0,
  116. "minExecutionTime" : 101,
  117. "maxExecutionTime" : 101,
  118. "lastExecutionTIme" : 101,
  119. "median" : 101.0
  120. } ];
  121. var $table = $('<table class="table table-bordered my-table sortable"><thead><tr><th class="text">Case</th><th>Count</th><th>Success</th><th>Failed</th><th>Min Time</th><th>Max Time</th><th>Last Time</th><th>Median</th></tr></thead><tbody></tbody></table>'),
  122. $tbody = $table.find('tbody');
  123.  
  124. for (var i = 0; i < reportJson.length; i++) {
  125. var d = reportJson[i];
  126. $tbody.append('<tr><td class="text">' + d.name + '</td><td>' + d.count + '</td><td>' + d.success + '</td><td>' + d.failed + '</td><td>' + d.minExecutionTime + '</td><td>' + d.maxExecutionTime + '</td><td>' + d.lastExecutionTIme + '</td><td>' + d.median + '</td></tr>')
  127. }
  128.  
  129. $(document).on('ready', function() {
  130. $('#page').append($table);
  131. })
  132. </script>
  133. </head>
  134. <body>
  135. <div id="page">
  136. <h2>Alipay stresstest report</h2>
  137. </div>
  138. </body>
  139. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement