-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed a few conditions where memory couldn't be released
removed some goroutine leaks added servicetime to requests and average service time to graphs replaced message bus with another one improved code reuse in chart/dashboard layout code (drop down options are reused)
- Loading branch information
1 parent
c84cd4b
commit c8e6c9c
Showing
19 changed files
with
301 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
-- nuke buffer and remake | ||
DROP TABLE buffer; | ||
CREATE TABLE buffer ( | ||
Id INTEGER PRIMARY KEY, | ||
Address TEXT DEFAULT '', | ||
Consumer TEXT DEFAULT '', | ||
ClientName TEXT DEFAULT '', | ||
RequestDomain TEXT DEFAULT '', | ||
RequestType TEXT DEFAULT '', | ||
ResponseText TEXT DEFAULT '', | ||
Cached BOOLEAN DEFAULT false, | ||
Blocked BOOLEAN DEFAULT false, | ||
Match INT DEFAULT 0, | ||
MatchList TEXT DEFAULT '', | ||
MatchListShort TEXT DEFAULT '', | ||
MatchRule TEXT DEFAULT '', | ||
Rcode TEXT DEFAULT '', | ||
Created DATETIME, | ||
StartTime DATETIME, | ||
EndTime DATETIME | ||
); | ||
|
||
-- move old qlog table | ||
ALTER TABLE qlog RENAME TO _qlog_old; | ||
|
||
-- create qlog schema with indexes for long-term storage/use | ||
CREATE TABLE qlog ( | ||
Id INTEGER PRIMARY KEY, | ||
Address TEXT DEFAULT '', | ||
Consumer TEXT DEFAULT '', | ||
ClientName TEXT DEFAULT '', | ||
RequestDomain TEXT DEFAULT '', | ||
RequestType TEXT DEFAULT '', | ||
ResponseText TEXT DEFAULT '', | ||
Cached BOOLEAN DEFAULT false, | ||
Blocked BOOLEAN DEFAULT false, | ||
Match INT DEFAULT 0, | ||
MatchList TEXT DEFAULT '', | ||
MatchListShort TEXT DEFAULT '', | ||
MatchRule TEXT DEFAULT '', | ||
Rcode TEXT DEFAULT '', | ||
Created DATETIME, | ||
StartTime DATETIME, | ||
EndTime DATETIME | ||
); | ||
|
||
-- create qlog index columns | ||
CREATE INDEX idx_qlog_Address ON qlog (Address); | ||
CREATE INDEX idx_qlog_RequestDomain ON qlog (RequestDomain); | ||
CREATE INDEX idx_qlog_Match ON qlog (Match); | ||
CREATE INDEX idx_qlog_Created ON qlog (Created); | ||
CREATE INDEX idx_qlog_Cached ON qlog (Cached); | ||
|
||
-- move records | ||
INSERT INTO qlog (Address, Consumer, ClientName, RequestDomain, RequestType, ResponseText, Cached, Blocked, Match, MatchList, MatchListShort, MatchRule, Rcode, Created, StartTime, EndTime) | ||
SELECT Address, Consumer, ClientName, RequestDomain, RequestType, ResponseText, Cached, Blocked, Match, MatchList, MatchListShort, MatchRule, Rcode, Created, StartTime, EndTime | ||
FROM _qlog_old; | ||
|
||
-- drop old table | ||
DROP TABLE _qlog_old; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- add service time (ms) to buffer | ||
ALTER TABLE buffer ADD COLUMN ServiceTime INTEGER DEFAULT 0; | ||
UPDATE buffer SET ServiceTime = 0 WHERE ServiceTime = null; | ||
|
||
-- add service time (ms) to qlog | ||
ALTER TABLE qlog ADD COLUMN ServiceTime INTEGER DEFAULT 0; | ||
UPDATE qlog SET ServiceTime = 0 WHERE ServiceTime = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.