sessions.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857
  1. export function SessionsField({field} = {}) {
  2. return {
  3. query: '',
  4. intervals: [
  5. '2021-03-05T00:00:00Z',
  6. '2021-03-06T00:00:00Z',
  7. '2021-03-07T00:00:00Z',
  8. '2021-03-08T00:00:00Z',
  9. '2021-03-09T00:00:00Z',
  10. '2021-03-10T00:00:00Z',
  11. '2021-03-11T00:00:00Z',
  12. '2021-03-12T00:00:00Z',
  13. '2021-03-13T00:00:00Z',
  14. '2021-03-14T00:00:00Z',
  15. '2021-03-15T00:00:00Z',
  16. '2021-03-16T00:00:00Z',
  17. '2021-03-17T00:00:00Z',
  18. '2021-03-18T00:00:00Z',
  19. ],
  20. groups: [
  21. {
  22. by: {},
  23. totals: {
  24. [field]: 492,
  25. },
  26. series: {
  27. [field]: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 490],
  28. },
  29. },
  30. ],
  31. };
  32. }
  33. export function SessionUserCountByStatus() {
  34. return {
  35. query: '',
  36. intervals: [
  37. '2021-03-05T00:00:00Z',
  38. '2021-03-06T00:00:00Z',
  39. '2021-03-07T00:00:00Z',
  40. '2021-03-08T00:00:00Z',
  41. '2021-03-09T00:00:00Z',
  42. '2021-03-10T00:00:00Z',
  43. '2021-03-11T00:00:00Z',
  44. '2021-03-12T00:00:00Z',
  45. '2021-03-13T00:00:00Z',
  46. '2021-03-14T00:00:00Z',
  47. '2021-03-15T00:00:00Z',
  48. '2021-03-16T00:00:00Z',
  49. '2021-03-17T00:00:00Z',
  50. '2021-03-18T00:00:00Z',
  51. ],
  52. groups: [
  53. {
  54. by: {
  55. 'session.status': 'crashed',
  56. },
  57. totals: {
  58. 'sum(session)': 492,
  59. 'count_unique(user)': 92,
  60. 'p50(session.duration)': 195,
  61. },
  62. series: {
  63. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 490],
  64. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 90],
  65. 'p50(session.duration)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 193],
  66. },
  67. },
  68. {
  69. by: {
  70. 'session.status': 'healthy',
  71. },
  72. totals: {
  73. 'sum(session)': 9260,
  74. 'count_unique(user)': 260,
  75. 'p50(session.duration)': 195,
  76. },
  77. series: {
  78. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9167, 93],
  79. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 258],
  80. 'p50(session.duration)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 193],
  81. },
  82. },
  83. {
  84. by: {
  85. 'session.status': 'abnormal',
  86. },
  87. totals: {
  88. 'sum(session)': 0,
  89. 'count_unique(user)': 0,
  90. 'p50(session.duration)': 0,
  91. },
  92. series: {
  93. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  94. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  95. 'p50(session.duration)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  96. },
  97. },
  98. {
  99. by: {
  100. 'session.status': 'errored',
  101. },
  102. totals: {
  103. 'sum(session)': 99,
  104. 'count_unique(user)': 9,
  105. 'p50(session.duration)': 195,
  106. },
  107. series: {
  108. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0],
  109. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8],
  110. 'p50(session.duration)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 194],
  111. },
  112. },
  113. ],
  114. };
  115. }
  116. // this one is higher than the first one
  117. // first one can be used as "This Release" and the second one works nicely as "All Releases"
  118. export function SessionUserCountByStatus2() {
  119. return {
  120. query: '',
  121. intervals: [
  122. '2021-03-05T00:00:00Z',
  123. '2021-03-06T00:00:00Z',
  124. '2021-03-07T00:00:00Z',
  125. '2021-03-08T00:00:00Z',
  126. '2021-03-09T00:00:00Z',
  127. '2021-03-10T00:00:00Z',
  128. '2021-03-11T00:00:00Z',
  129. '2021-03-12T00:00:00Z',
  130. '2021-03-13T00:00:00Z',
  131. '2021-03-14T00:00:00Z',
  132. '2021-03-15T00:00:00Z',
  133. '2021-03-16T00:00:00Z',
  134. '2021-03-17T00:00:00Z',
  135. '2021-03-18T00:00:00Z',
  136. ],
  137. groups: [
  138. {
  139. by: {
  140. 'session.status': 'crashed',
  141. },
  142. totals: {
  143. 'sum(session)': 992,
  144. 'count_unique(user)': 92,
  145. 'p50(session.duration)': 802,
  146. },
  147. series: {
  148. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 990],
  149. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 90],
  150. 'p50(session.duration)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 800],
  151. },
  152. },
  153. {
  154. by: {
  155. 'session.status': 'abnormal',
  156. },
  157. totals: {
  158. 'sum(session)': 0,
  159. 'count_unique(user)': 0,
  160. 'p50(session.duration)': 0,
  161. },
  162. series: {
  163. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  164. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  165. 'p50(session.duration)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  166. },
  167. },
  168. {
  169. by: {
  170. 'session.status': 'healthy',
  171. },
  172. totals: {
  173. 'sum(session)': 202136,
  174. 'count_unique(user)': 99136,
  175. 'p50(session.duration)': 108404,
  176. },
  177. series: {
  178. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3404, 198732],
  179. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 404, 98732],
  180. 'p50(session.duration)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 404, 108000],
  181. },
  182. },
  183. {
  184. by: {
  185. 'session.status': 'errored',
  186. },
  187. totals: {
  188. 'sum(session)': 1954,
  189. 'count_unique(user)': 915,
  190. 'p50(session.duration)': 800,
  191. },
  192. series: {
  193. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 1914],
  194. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 914],
  195. 'p50(session.duration)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 799],
  196. },
  197. },
  198. ],
  199. };
  200. }
  201. export function SessionStatusCountByReleaseInPeriod() {
  202. return {
  203. query:
  204. 'release:7a82c130be9143361f20bc77252df783cf91e4fc OR release:e102abb2c46e7fe8686441091005c12aed90da99',
  205. intervals: [
  206. '2021-03-05T00:00:00Z',
  207. '2021-03-06T00:00:00Z',
  208. '2021-03-07T00:00:00Z',
  209. '2021-03-08T00:00:00Z',
  210. '2021-03-09T00:00:00Z',
  211. '2021-03-10T00:00:00Z',
  212. '2021-03-11T00:00:00Z',
  213. '2021-03-12T00:00:00Z',
  214. '2021-03-13T00:00:00Z',
  215. '2021-03-14T00:00:00Z',
  216. '2021-03-15T00:00:00Z',
  217. '2021-03-16T00:00:00Z',
  218. '2021-03-17T00:00:00Z',
  219. '2021-03-18T00:00:00Z',
  220. ],
  221. groups: [
  222. {
  223. by: {
  224. project: 123,
  225. release: '7a82c130be9143361f20bc77252df783cf91e4fc',
  226. 'session.status': 'crashed',
  227. },
  228. totals: {'sum(session)': 492},
  229. series: {'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 490]},
  230. },
  231. {
  232. by: {
  233. 'session.status': 'healthy',
  234. project: 123,
  235. release: 'e102abb2c46e7fe8686441091005c12aed90da99',
  236. },
  237. totals: {'sum(session)': 6260},
  238. series: {'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5750, 510]},
  239. },
  240. {
  241. by: {
  242. project: 123,
  243. 'session.status': 'abnormal',
  244. release: 'e102abb2c46e7fe8686441091005c12aed90da99',
  245. },
  246. totals: {'sum(session)': 0},
  247. series: {'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]},
  248. },
  249. {
  250. by: {
  251. project: 123,
  252. release: 'e102abb2c46e7fe8686441091005c12aed90da99',
  253. 'session.status': 'crashed',
  254. },
  255. totals: {'sum(session)': 5},
  256. series: {'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0]},
  257. },
  258. {
  259. by: {
  260. project: 123,
  261. 'session.status': 'abnormal',
  262. release: '7a82c130be9143361f20bc77252df783cf91e4fc',
  263. },
  264. totals: {'sum(session)': 0},
  265. series: {'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]},
  266. },
  267. {
  268. by: {
  269. project: 123,
  270. release: 'e102abb2c46e7fe8686441091005c12aed90da99',
  271. 'session.status': 'errored',
  272. },
  273. totals: {'sum(session)': 59},
  274. series: {'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0]},
  275. },
  276. {
  277. by: {
  278. 'session.status': 'healthy',
  279. project: 123,
  280. release: '7a82c130be9143361f20bc77252df783cf91e4fc',
  281. },
  282. totals: {'sum(session)': 202136},
  283. series: {'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3404, 198732]},
  284. },
  285. {
  286. by: {
  287. project: 123,
  288. release: '7a82c130be9143361f20bc77252df783cf91e4fc',
  289. 'session.status': 'errored',
  290. },
  291. totals: {'sum(session)': 1954},
  292. series: {'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 1914]},
  293. },
  294. ],
  295. };
  296. }
  297. export function SessionStatusCountByProjectInPeriod() {
  298. return {
  299. query: '',
  300. intervals: [
  301. '2021-03-05T00:00:00Z',
  302. '2021-03-06T00:00:00Z',
  303. '2021-03-07T00:00:00Z',
  304. '2021-03-08T00:00:00Z',
  305. '2021-03-09T00:00:00Z',
  306. '2021-03-10T00:00:00Z',
  307. '2021-03-11T00:00:00Z',
  308. '2021-03-12T00:00:00Z',
  309. '2021-03-13T00:00:00Z',
  310. '2021-03-14T00:00:00Z',
  311. '2021-03-15T00:00:00Z',
  312. '2021-03-16T00:00:00Z',
  313. '2021-03-17T00:00:00Z',
  314. '2021-03-18T00:00:00Z',
  315. ],
  316. groups: [
  317. {
  318. by: {
  319. project: 123,
  320. 'session.status': 'crashed',
  321. },
  322. totals: {'sum(session)': 992},
  323. series: {'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 990]},
  324. },
  325. {
  326. by: {
  327. project: 123,
  328. 'session.status': 'healthy',
  329. },
  330. totals: {'sum(session)': 9260},
  331. series: {'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9167, 93]},
  332. },
  333. {
  334. by: {
  335. project: 123,
  336. 'session.status': 'abnormal',
  337. },
  338. totals: {'sum(session)': 0},
  339. series: {'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]},
  340. },
  341. {
  342. by: {
  343. project: 123,
  344. 'session.status': 'errored',
  345. },
  346. totals: {'sum(session)': 99},
  347. series: {'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0]},
  348. },
  349. ],
  350. };
  351. }
  352. export function SesssionTotalCountByReleaseIn24h() {
  353. return {
  354. query:
  355. 'release:7a82c130be9143361f20bc77252df783cf91e4fc OR release:e102abb2c46e7fe8686441091005c12aed90da99',
  356. intervals: [
  357. '2021-03-17T10:00:00Z',
  358. '2021-03-17T11:00:00Z',
  359. '2021-03-17T12:00:00Z',
  360. '2021-03-17T13:00:00Z',
  361. '2021-03-17T14:00:00Z',
  362. '2021-03-17T15:00:00Z',
  363. '2021-03-17T16:00:00Z',
  364. '2021-03-17T17:00:00Z',
  365. '2021-03-17T18:00:00Z',
  366. '2021-03-17T19:00:00Z',
  367. '2021-03-17T20:00:00Z',
  368. '2021-03-17T21:00:00Z',
  369. '2021-03-17T22:00:00Z',
  370. '2021-03-17T23:00:00Z',
  371. '2021-03-18T00:00:00Z',
  372. '2021-03-18T01:00:00Z',
  373. '2021-03-18T02:00:00Z',
  374. '2021-03-18T03:00:00Z',
  375. '2021-03-18T04:00:00Z',
  376. '2021-03-18T05:00:00Z',
  377. '2021-03-18T06:00:00Z',
  378. '2021-03-18T07:00:00Z',
  379. '2021-03-18T08:00:00Z',
  380. '2021-03-18T09:00:00Z',
  381. ],
  382. groups: [
  383. {
  384. by: {project: 123, release: '7a82c130be9143361f20bc77252df783cf91e4fc'},
  385. totals: {'sum(session)': 219826},
  386. series: {
  387. 'sum(session)': [
  388. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3444, 14912, 15649, 18019, 16726,
  389. 17540, 16970, 25015, 34686, 46434, 10431,
  390. ],
  391. },
  392. },
  393. {
  394. by: {release: 'e102abb2c46e7fe8686441091005c12aed90da99', project: 123},
  395. totals: {'sum(session)': 6320},
  396. series: {
  397. 'sum(session)': [
  398. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5809, 400, 22, 26, 12, 19, 8, 0, 19, 5,
  399. 0,
  400. ],
  401. },
  402. },
  403. ],
  404. };
  405. }
  406. export function SessionTotalCountByProjectIn24h() {
  407. return {
  408. query: '',
  409. intervals: [
  410. '2021-03-17T10:00:00Z',
  411. '2021-03-17T11:00:00Z',
  412. '2021-03-17T12:00:00Z',
  413. '2021-03-17T13:00:00Z',
  414. '2021-03-17T14:00:00Z',
  415. '2021-03-17T15:00:00Z',
  416. '2021-03-17T16:00:00Z',
  417. '2021-03-17T17:00:00Z',
  418. '2021-03-17T18:00:00Z',
  419. '2021-03-17T19:00:00Z',
  420. '2021-03-17T20:00:00Z',
  421. '2021-03-17T21:00:00Z',
  422. '2021-03-17T22:00:00Z',
  423. '2021-03-17T23:00:00Z',
  424. '2021-03-18T00:00:00Z',
  425. '2021-03-18T01:00:00Z',
  426. '2021-03-18T02:00:00Z',
  427. '2021-03-18T03:00:00Z',
  428. '2021-03-18T04:00:00Z',
  429. '2021-03-18T05:00:00Z',
  430. '2021-03-18T06:00:00Z',
  431. '2021-03-18T07:00:00Z',
  432. '2021-03-18T08:00:00Z',
  433. '2021-03-18T09:00:00Z',
  434. ],
  435. groups: [
  436. {
  437. by: {project: 123},
  438. totals: {'sum(session)': 835965},
  439. series: {
  440. 'sum(session)': [
  441. 51284, 43820, 46981, 56929, 59999, 60476, 54145, 52642, 42917, 35787, 35036,
  442. 29287, 24815, 19815, 16334, 16415, 18961, 17512, 18149, 17585, 25725, 36365,
  443. 48104, 6882,
  444. ],
  445. },
  446. },
  447. ],
  448. };
  449. }
  450. export function SessionUserStatusCountByReleaseInPeriod() {
  451. return {
  452. query:
  453. 'release:7a82c130be9143361f20bc77252df783cf91e4fc OR release:e102abb2c46e7fe8686441091005c12aed90da99',
  454. intervals: [
  455. '2021-03-05T00:00:00Z',
  456. '2021-03-06T00:00:00Z',
  457. '2021-03-07T00:00:00Z',
  458. '2021-03-08T00:00:00Z',
  459. '2021-03-09T00:00:00Z',
  460. '2021-03-10T00:00:00Z',
  461. '2021-03-11T00:00:00Z',
  462. '2021-03-12T00:00:00Z',
  463. '2021-03-13T00:00:00Z',
  464. '2021-03-14T00:00:00Z',
  465. '2021-03-15T00:00:00Z',
  466. '2021-03-16T00:00:00Z',
  467. '2021-03-17T00:00:00Z',
  468. '2021-03-18T00:00:00Z',
  469. ],
  470. groups: [
  471. {
  472. by: {
  473. project: 123,
  474. release: '7a82c130be9143361f20bc77252df783cf91e4fc',
  475. 'session.status': 'crashed',
  476. },
  477. totals: {'sum(session)': 492, 'count_unique(user)': 92},
  478. series: {
  479. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 490],
  480. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 90],
  481. },
  482. },
  483. {
  484. by: {
  485. 'session.status': 'healthy',
  486. project: 123,
  487. release: 'e102abb2c46e7fe8686441091005c12aed90da99',
  488. },
  489. totals: {'sum(session)': 6260, 'count_unique(user)': 760},
  490. series: {
  491. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5750, 510],
  492. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 750, 10],
  493. },
  494. },
  495. {
  496. by: {
  497. project: 123,
  498. 'session.status': 'abnormal',
  499. release: 'e102abb2c46e7fe8686441091005c12aed90da99',
  500. },
  501. totals: {'sum(session)': 0, 'count_unique(user)': 0},
  502. series: {
  503. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  504. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  505. },
  506. },
  507. {
  508. by: {
  509. project: 123,
  510. release: 'e102abb2c46e7fe8686441091005c12aed90da99',
  511. 'session.status': 'crashed',
  512. },
  513. totals: {'sum(session)': 5, 'count_unique(user)': 1},
  514. series: {
  515. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0],
  516. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
  517. },
  518. },
  519. {
  520. by: {
  521. project: 123,
  522. 'session.status': 'abnormal',
  523. release: '7a82c130be9143361f20bc77252df783cf91e4fc',
  524. },
  525. totals: {'sum(session)': 0, 'count_unique(user)': 0},
  526. series: {
  527. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  528. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  529. },
  530. },
  531. {
  532. by: {
  533. project: 123,
  534. release: 'e102abb2c46e7fe8686441091005c12aed90da99',
  535. 'session.status': 'errored',
  536. },
  537. totals: {'sum(session)': 59, 'count_unique(user)': 9},
  538. series: {
  539. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0],
  540. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0],
  541. },
  542. },
  543. {
  544. by: {
  545. 'session.status': 'healthy',
  546. project: 123,
  547. release: '7a82c130be9143361f20bc77252df783cf91e4fc',
  548. },
  549. totals: {'sum(session)': 202136, 'count_unique(user)': 99136},
  550. series: {
  551. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3404, 198732],
  552. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 404, 98732],
  553. },
  554. },
  555. {
  556. by: {
  557. project: 123,
  558. release: '7a82c130be9143361f20bc77252df783cf91e4fc',
  559. 'session.status': 'errored',
  560. },
  561. totals: {'sum(session)': 1954, 'count_unique(user)': 915},
  562. series: {
  563. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 1914],
  564. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 914],
  565. },
  566. },
  567. ],
  568. };
  569. }
  570. export function SessionUserStatusCountByProjectInPeriod() {
  571. return {
  572. query: '',
  573. intervals: [
  574. '2021-03-05T00:00:00Z',
  575. '2021-03-06T00:00:00Z',
  576. '2021-03-07T00:00:00Z',
  577. '2021-03-08T00:00:00Z',
  578. '2021-03-09T00:00:00Z',
  579. '2021-03-10T00:00:00Z',
  580. '2021-03-11T00:00:00Z',
  581. '2021-03-12T00:00:00Z',
  582. '2021-03-13T00:00:00Z',
  583. '2021-03-14T00:00:00Z',
  584. '2021-03-15T00:00:00Z',
  585. '2021-03-16T00:00:00Z',
  586. '2021-03-17T00:00:00Z',
  587. '2021-03-18T00:00:00Z',
  588. ],
  589. groups: [
  590. {
  591. by: {
  592. project: 123,
  593. 'session.status': 'crashed',
  594. },
  595. totals: {'sum(session)': 992, 'count_unique(user)': 92},
  596. series: {
  597. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 990],
  598. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 90],
  599. },
  600. },
  601. {
  602. by: {
  603. project: 123,
  604. 'session.status': 'healthy',
  605. },
  606. totals: {'sum(session)': 9260, 'count_unique(user)': 260},
  607. series: {
  608. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9167, 93],
  609. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 258],
  610. },
  611. },
  612. {
  613. by: {
  614. project: 123,
  615. 'session.status': 'abnormal',
  616. },
  617. totals: {'sum(session)': 0, 'count_unique(user)': 0},
  618. series: {
  619. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  620. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  621. },
  622. },
  623. {
  624. by: {
  625. project: 123,
  626. 'session.status': 'errored',
  627. },
  628. totals: {'sum(session)': 99, 'count_unique(user)': 9},
  629. series: {
  630. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0],
  631. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8],
  632. },
  633. },
  634. ],
  635. };
  636. }
  637. export function UserTotalCountByReleaseIn24h() {
  638. return {
  639. query:
  640. 'release:7a82c130be9143361f20bc77252df783cf91e4fc OR release:e102abb2c46e7fe8686441091005c12aed90da99',
  641. intervals: [
  642. '2021-03-17T10:00:00Z',
  643. '2021-03-17T11:00:00Z',
  644. '2021-03-17T12:00:00Z',
  645. '2021-03-17T13:00:00Z',
  646. '2021-03-17T14:00:00Z',
  647. '2021-03-17T15:00:00Z',
  648. '2021-03-17T16:00:00Z',
  649. '2021-03-17T17:00:00Z',
  650. '2021-03-17T18:00:00Z',
  651. '2021-03-17T19:00:00Z',
  652. '2021-03-17T20:00:00Z',
  653. '2021-03-17T21:00:00Z',
  654. '2021-03-17T22:00:00Z',
  655. '2021-03-17T23:00:00Z',
  656. '2021-03-18T00:00:00Z',
  657. '2021-03-18T01:00:00Z',
  658. '2021-03-18T02:00:00Z',
  659. '2021-03-18T03:00:00Z',
  660. '2021-03-18T04:00:00Z',
  661. '2021-03-18T05:00:00Z',
  662. '2021-03-18T06:00:00Z',
  663. '2021-03-18T07:00:00Z',
  664. '2021-03-18T08:00:00Z',
  665. '2021-03-18T09:00:00Z',
  666. ],
  667. groups: [
  668. {
  669. by: {project: 123, release: '7a82c130be9143361f20bc77252df783cf91e4fc'},
  670. totals: {'count_unique(user)': 56826},
  671. series: {
  672. 'count_unique(user)': [
  673. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 444, 4912, 5649, 8019, 6726, 7540,
  674. 6970, 5015, 4686, 6434, 431,
  675. ],
  676. },
  677. },
  678. {
  679. by: {release: 'e102abb2c46e7fe8686441091005c12aed90da99', project: 123},
  680. totals: {'count_unique(user)': 850},
  681. series: {
  682. 'count_unique(user)': [
  683. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 809, 0, 2, 6, 2, 9, 8, 0, 9, 5, 0,
  684. ],
  685. },
  686. },
  687. ],
  688. };
  689. }
  690. export function UserTotalCountByProjectIn24h() {
  691. return {
  692. query: '',
  693. intervals: [
  694. '2021-03-17T10:00:00Z',
  695. '2021-03-17T11:00:00Z',
  696. '2021-03-17T12:00:00Z',
  697. '2021-03-17T13:00:00Z',
  698. '2021-03-17T14:00:00Z',
  699. '2021-03-17T15:00:00Z',
  700. '2021-03-17T16:00:00Z',
  701. '2021-03-17T17:00:00Z',
  702. '2021-03-17T18:00:00Z',
  703. '2021-03-17T19:00:00Z',
  704. '2021-03-17T20:00:00Z',
  705. '2021-03-17T21:00:00Z',
  706. '2021-03-17T22:00:00Z',
  707. '2021-03-17T23:00:00Z',
  708. '2021-03-18T00:00:00Z',
  709. '2021-03-18T01:00:00Z',
  710. '2021-03-18T02:00:00Z',
  711. '2021-03-18T03:00:00Z',
  712. '2021-03-18T04:00:00Z',
  713. '2021-03-18T05:00:00Z',
  714. '2021-03-18T06:00:00Z',
  715. '2021-03-18T07:00:00Z',
  716. '2021-03-18T08:00:00Z',
  717. '2021-03-18T09:00:00Z',
  718. ],
  719. groups: [
  720. {
  721. by: {project: 123},
  722. totals: {'count_unique(user)': 140965},
  723. series: {
  724. 'count_unique(user)': [
  725. 1284, 3820, 6981, 6929, 9999, 1476, 4145, 2642, 2917, 5787, 5036, 9287, 4815,
  726. 9815, 6334, 6415, 8961, 7512, 8149, 7585, 5725, 6365, 8104, 882,
  727. ],
  728. },
  729. },
  730. ],
  731. };
  732. }
  733. export function SessionUserCountByStatusByRelease() {
  734. return {
  735. start: '2022-01-15T00:00:00Z',
  736. end: '2022-01-29T00:00:00Z',
  737. query: '',
  738. intervals: [
  739. '2022-01-15T00:00:00Z',
  740. '2022-01-16T00:00:00Z',
  741. '2022-01-17T00:00:00Z',
  742. '2022-01-18T00:00:00Z',
  743. '2022-01-19T00:00:00Z',
  744. '2022-01-20T00:00:00Z',
  745. '2022-01-21T00:00:00Z',
  746. '2022-01-22T00:00:00Z',
  747. '2022-01-23T00:00:00Z',
  748. '2022-01-24T00:00:00Z',
  749. '2022-01-25T00:00:00Z',
  750. '2022-01-26T00:00:00Z',
  751. '2022-01-27T00:00:00Z',
  752. '2022-01-28T00:00:00Z',
  753. ],
  754. groups: [
  755. {
  756. by: {'session.status': 'crashed', release: '1'},
  757. totals: {'sum(session)': 34, 'count_unique(user)': 1},
  758. series: {
  759. 'sum(session)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 11, 0, 0, 0],
  760. 'count_unique(user)': [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0],
  761. },
  762. },
  763. {
  764. by: {'session.status': 'abnormal', release: '1'},
  765. totals: {'sum(session)': 1, 'count_unique(user)': 1},
  766. series: {
  767. 'sum(session)': [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  768. 'count_unique(user)': [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  769. },
  770. },
  771. {
  772. by: {'session.status': 'errored', release: '1'},
  773. totals: {'sum(session)': 451, 'count_unique(user)': 2},
  774. series: {
  775. 'sum(session)': [0, 0, 0, 0, 0, 37, 0, 0, 0, 335, 79, 0, 0, 0],
  776. 'count_unique(user)': [0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 2, 0, 0, 0],
  777. },
  778. },
  779. {
  780. by: {'session.status': 'healthy', release: '1'},
  781. totals: {'sum(session)': 5058, 'count_unique(user)': 3},
  782. series: {
  783. 'sum(session)': [0, 0, 0, 0, 0, 2503, 661, 0, 0, 1464, 430, 0, 0, 0],
  784. 'count_unique(user)': [0, 0, 0, 0, 0, 3, 3, 0, 0, 1, 1, 0, 0, 0],
  785. },
  786. },
  787. {
  788. by: {'session.status': 'crashed', release: '2'},
  789. totals: {'sum(session)': 35, 'count_unique(user)': 2},
  790. series: {
  791. 'sum(session)': [1, 0, 0, 0, 0, 0, 0, 0, 0, 23, 11, 0, 0, 0],
  792. 'count_unique(user)': [1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0],
  793. },
  794. },
  795. {
  796. by: {'session.status': 'abnormal', release: '2'},
  797. totals: {'sum(session)': 1, 'count_unique(user)': 1},
  798. series: {
  799. 'sum(session)': [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  800. 'count_unique(user)': [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  801. },
  802. },
  803. {
  804. by: {'session.status': 'errored', release: '2'},
  805. totals: {'sum(session)': 452, 'count_unique(user)': 1},
  806. series: {
  807. 'sum(session)': [1, 0, 0, 0, 0, 37, 0, 0, 0, 335, 79, 0, 0, 0],
  808. 'count_unique(user)': [1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0],
  809. },
  810. },
  811. {
  812. by: {'session.status': 'healthy', release: '2'},
  813. totals: {'sum(session)': 5059, 'count_unique(user)': 10},
  814. series: {
  815. 'sum(session)': [1, 0, 0, 0, 0, 2503, 661, 0, 0, 1464, 430, 0, 0, 0],
  816. 'count_unique(user)': [1, 0, 0, 0, 0, 10, 3, 0, 0, 4, 3, 0, 0, 0],
  817. },
  818. },
  819. ],
  820. };
  821. }
  822. export function SessionEmptyGroupedResponse() {
  823. return {
  824. start: '2022-01-15T00:00:00Z',
  825. end: '2022-01-29T00:00:00Z',
  826. query: '',
  827. intervals: [
  828. '2022-01-15T00:00:00Z',
  829. '2022-01-16T00:00:00Z',
  830. '2022-01-17T00:00:00Z',
  831. '2022-01-18T00:00:00Z',
  832. '2022-01-19T00:00:00Z',
  833. '2022-01-20T00:00:00Z',
  834. '2022-01-21T00:00:00Z',
  835. '2022-01-22T00:00:00Z',
  836. '2022-01-23T00:00:00Z',
  837. '2022-01-24T00:00:00Z',
  838. '2022-01-25T00:00:00Z',
  839. '2022-01-26T00:00:00Z',
  840. '2022-01-27T00:00:00Z',
  841. '2022-01-28T00:00:00Z',
  842. ],
  843. groups: [],
  844. };
  845. }