@@ -166,6 +166,7 @@ func TestParseSlowLog002(t *testing.T) {
166
166
Host : "" ,
167
167
Offset : 337 ,
168
168
OffsetEnd : 813 ,
169
+ Ts : time .Unix (1197996507 , 0 ),
169
170
TimeMetrics : map [string ]float64 {
170
171
"Query_time" : 0.726052 ,
171
172
"Lock_time" : 0.000091 ,
@@ -194,6 +195,7 @@ VALUES ('', 'Exact')`,
194
195
Host : "" ,
195
196
Offset : 813 ,
196
197
OffsetEnd : 1332 ,
198
+ Ts : time .Unix (1197996507 , 0 ),
197
199
TimeMetrics : map [string ]float64 {
198
200
"InnoDB_queue_wait" : 0.000000 ,
199
201
"Lock_time" : 0.000077 ,
@@ -332,6 +334,7 @@ WHERE fillze='899'`,
332
334
Host : "" ,
333
335
Offset : 2859 ,
334
336
OffsetEnd : 3372 ,
337
+ Ts : time .Unix (1197996508 , 0 ),
335
338
TimeMetrics : map [string ]float64 {
336
339
"Query_time" : 0.000530 ,
337
340
"InnoDB_IO_r_wait" : 0.000000 ,
@@ -880,6 +883,7 @@ func TestParserSlowLog011(t *testing.T) {
880
883
User : "user1" ,
881
884
RateType : "query" ,
882
885
RateLimit : 2 ,
886
+ Ts : time .Unix (1385600731 , 0 ),
883
887
TimeMetrics : map [string ]float64 {
884
888
"Query_time" : 0.000237 ,
885
889
"Lock_time" : 0.000122 ,
@@ -922,6 +926,7 @@ func TestParserSlowLog011(t *testing.T) {
922
926
User : "user1" ,
923
927
RateType : "query" ,
924
928
RateLimit : 2 ,
929
+ Ts : time .Unix (1385600731 , 0 ),
925
930
TimeMetrics : map [string ]float64 {
926
931
"Query_time" : 0.000165 ,
927
932
"Lock_time" : 0.000048 ,
@@ -969,6 +974,7 @@ func TestParserSlowLog012(t *testing.T) {
969
974
User : "msandbox" ,
970
975
Offset : 0 ,
971
976
OffsetEnd : 185 ,
977
+ Ts : time .Unix (1397442852 , 0 ),
972
978
TimeMetrics : map [string ]float64 {
973
979
"Query_time" : 0.000214 ,
974
980
"Lock_time" : 0.000086 ,
@@ -987,6 +993,7 @@ func TestParserSlowLog012(t *testing.T) {
987
993
User : "msandbox" ,
988
994
Offset : 185 ,
989
995
OffsetEnd : 375 ,
996
+ Ts : time .Unix (1397442852 , 0 ),
990
997
TimeMetrics : map [string ]float64 {
991
998
"Query_time" : 0.000016 ,
992
999
"Lock_time" : 0.000000 ,
@@ -1149,6 +1156,7 @@ func TestParserSlowLog014(t *testing.T) {
1149
1156
User : "root" ,
1150
1157
Host : "localhost" ,
1151
1158
Db : "db1" ,
1159
+ Ts : time .Unix (1398555955 , 0 ),
1152
1160
TimeMetrics : map [string ]float64 {
1153
1161
"InnoDB_IO_r_wait" : 0 ,
1154
1162
"InnoDB_queue_wait" : 0 ,
@@ -1195,6 +1203,7 @@ func TestParserSlowLog014(t *testing.T) {
1195
1203
User : "root" ,
1196
1204
Host : "localhost" ,
1197
1205
Db : "db1" ,
1206
+ Ts : time .Unix (1398555955 , 0 ),
1198
1207
TimeMetrics : map [string ]float64 {
1199
1208
"InnoDB_IO_r_wait" : 0 ,
1200
1209
"InnoDB_queue_wait" : 0 ,
@@ -1237,6 +1246,7 @@ func TestParserSlowLog014(t *testing.T) {
1237
1246
User : "root" ,
1238
1247
Host : "localhost" ,
1239
1248
Db : "db1" ,
1249
+ Ts : time .Unix (1398555955 , 0 ),
1240
1250
TimeMetrics : map [string ]float64 {
1241
1251
"InnoDB_IO_r_wait" : 0 ,
1242
1252
"InnoDB_queue_wait" : 0 ,
@@ -1279,6 +1289,7 @@ func TestParserSlowLog014(t *testing.T) {
1279
1289
User : "root" ,
1280
1290
Host : "localhost" ,
1281
1291
Db : "db1" ,
1292
+ Ts : time .Unix (1398555955 , 0 ),
1282
1293
TimeMetrics : map [string ]float64 {
1283
1294
"InnoDB_IO_r_wait" : 0 ,
1284
1295
"InnoDB_queue_wait" : 0 ,
@@ -1364,6 +1375,7 @@ func TestParseSlow016(t *testing.T) {
1364
1375
Host : "localhost" ,
1365
1376
Offset : 159 ,
1366
1377
OffsetEnd : 413 ,
1378
+ Ts : time .Unix (1400193480 , 0 ),
1367
1379
TimeMetrics : map [string ]float64 {
1368
1380
"Query_time" : 0.003953 ,
1369
1381
"Lock_time" : 0.000059 ,
@@ -1391,6 +1403,7 @@ func TestParseSlow017(t *testing.T) {
1391
1403
Host : "localhost" ,
1392
1404
Offset : 26 ,
1393
1405
OffsetEnd : 280 ,
1406
+ Ts : time .Unix (1400193480 , 0 ),
1394
1407
TimeMetrics : map [string ]float64 {
1395
1408
"Query_time" : 0.003953 ,
1396
1409
"Lock_time" : 0.000059 ,
@@ -1417,6 +1430,7 @@ func TestParseSlow019(t *testing.T) {
1417
1430
Host : "localhost" ,
1418
1431
Offset : 0 ,
1419
1432
OffsetEnd : 641 ,
1433
+ Ts : time .Unix (1413583349 , 0 ),
1420
1434
TimeMetrics : map [string ]float64 {
1421
1435
"Lock_time" : 0.0001 ,
1422
1436
"Query_time" : 0.004599 ,
@@ -1452,6 +1466,7 @@ func TestParseSlow019(t *testing.T) {
1452
1466
Offset : 641 ,
1453
1467
OffsetEnd : 1273 ,
1454
1468
Db : "cod7_plos15" ,
1469
+ Ts : time .Unix (1413583349 , 0 ),
1455
1470
TimeMetrics : map [string ]float64 {
1456
1471
"Lock_time" : 0 ,
1457
1472
"Query_time" : 2.2e-05 ,
@@ -1487,6 +1502,7 @@ func TestParseSlow019(t *testing.T) {
1487
1502
Offset : 1273 ,
1488
1503
OffsetEnd : 2005 ,
1489
1504
Db : "cod7_plos15" ,
1505
+ Ts : time .Unix (1413583349 , 0 ),
1490
1506
TimeMetrics : map [string ]float64 {
1491
1507
"InnoDB_IO_r_wait" : 0 ,
1492
1508
"InnoDB_queue_wait" : 0 ,
@@ -1528,6 +1544,7 @@ func TestParseSlow019(t *testing.T) {
1528
1544
Host : "localhost" ,
1529
1545
Offset : 2005 ,
1530
1546
OffsetEnd : 2621 ,
1547
+ Ts : time .Unix (1413583349 , 0 ),
1531
1548
TimeMetrics : map [string ]float64 {
1532
1549
"Lock_time" : 0.000115 ,
1533
1550
"Query_time" : 0.011565 ,
@@ -1573,6 +1590,7 @@ func TestParseSlow023(t *testing.T) {
1573
1590
User : "bookblogs" ,
1574
1591
Host : "localhost" ,
1575
1592
Db : "dbnamea" ,
1593
+ Ts : time .Unix (1415210700 , 0 ),
1576
1594
TimeMetrics : map [string ]float64 {
1577
1595
"Query_time" : 0.321092 ,
1578
1596
"Lock_time" : 3.8e-05 ,
@@ -1594,6 +1612,7 @@ func TestParseSlow023(t *testing.T) {
1594
1612
User : "bookblogs" ,
1595
1613
Host : "localhost" ,
1596
1614
Db : "" ,
1615
+ Ts : time .Unix (1415210700 , 0 ),
1597
1616
TimeMetrics : map [string ]float64 {
1598
1617
"Lock_time" : 0 ,
1599
1618
"Query_time" : 0.253052 ,
@@ -1615,6 +1634,7 @@ func TestParseSlow023(t *testing.T) {
1615
1634
User : "percona-agent" ,
1616
1635
Host : "localhost" ,
1617
1636
Db : "" ,
1637
+ Ts : time .Unix (1415210700 , 0 ),
1618
1638
TimeMetrics : map [string ]float64 {
1619
1639
"Query_time" : 0.31645 ,
1620
1640
"Lock_time" : 0 ,
@@ -1636,6 +1656,7 @@ func TestParseSlow023(t *testing.T) {
1636
1656
User : "bookblogs" ,
1637
1657
Host : "localhost" ,
1638
1658
Db : "" ,
1659
+ Ts : time .Unix (1415210700 , 0 ),
1639
1660
TimeMetrics : map [string ]float64 {
1640
1661
"Query_time" : 3.7e-05 ,
1641
1662
"Lock_time" : 0 ,
@@ -1657,6 +1678,7 @@ func TestParseSlow023(t *testing.T) {
1657
1678
User : "bookblogs" ,
1658
1679
Host : "localhost" ,
1659
1680
Db : "" ,
1681
+ Ts : time .Unix (1415210700 , 0 ),
1660
1682
TimeMetrics : map [string ]float64 {
1661
1683
"Query_time" : 0.000297 ,
1662
1684
"Lock_time" : 0.000141 ,
@@ -1677,6 +1699,7 @@ func TestParseSlow023(t *testing.T) {
1677
1699
User : "backup" ,
1678
1700
Host : "localhost" ,
1679
1701
Db : "dbnameb" ,
1702
+ Ts : time .Unix (1415210700 , 0 ),
1680
1703
TimeMetrics : map [string ]float64 {
1681
1704
"Lock_time" : 0 ,
1682
1705
"Query_time" : 0.000558 ,
@@ -1698,6 +1721,7 @@ func TestParseSlow023(t *testing.T) {
1698
1721
User : "backup" ,
1699
1722
Host : "localhost" ,
1700
1723
Db : "" ,
1724
+ Ts : time .Unix (1415210700 , 0 ),
1701
1725
TimeMetrics : map [string ]float64 {
1702
1726
"Query_time" : 0.000204 ,
1703
1727
"Lock_time" : 0 ,
@@ -1719,6 +1743,7 @@ func TestParseSlow023(t *testing.T) {
1719
1743
User : "bookblogs" ,
1720
1744
Host : "localhost" ,
1721
1745
Db : "" ,
1746
+ Ts : time .Unix (1415210700 , 0 ),
1722
1747
TimeMetrics : map [string ]float64 {
1723
1748
"Query_time" : 0.000164 ,
1724
1749
"Lock_time" : 5.9e-05 ,
0 commit comments