-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark cache #955
Open
jessevz
wants to merge
56
commits into
hashtopolis:dev
Choose a base branch
from
jessevz:master
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Benchmark cache #955
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
323b113
changed database structure for benchmarks. Added a Benchmark table an…
2f5cd16
Added the models for benchmark caching
d5885e6
Changed getchunk, sendbenchmark and updateclientinformation API to ma…
174e791
Added benchmarkUtils and HardwareGroupUtils
57483af
Changed Agent templates to use hardwareGroups
6f53747
Added frontend to view the cached benchmarks
75cedf4
fixed bug in benchmarkUtils
a5cf430
fixed bug in registerAgent, wasnt updated to hardwaregroup
0c3f561
updated install/hashtopolis.sql for benchmark cache
0c2509b
Added update script for database update
e06fb1f
Fixed errors in hashtopolis.sql file
f01d790
fixed bug in hashtopolis.sql
3a2d0db
fixed bug in hashtopolis.sql again
588e1ea
fixed bug in hashtopolis.sql, again
6049f50
fixed another bug in hashtopolis.sql, again
468a50b
added hashmode and benchmarktype to Benchmark object in hashtopolis.sql
bd7043e
fixed bug in hashtopolis.sql, creat table benchmark didnt work
a1e8b7b
updated the update script
df1f34c
fixed bug in hashtopolis.sql, defined hardwareGroup primary key twice
99d9aec
fixed typo in hashtopolis.sql
31991fd
Made hardwareGroupId in agent table nullable
19c9f4c
updated cache code to latest version
8f64838
Updated benchmark.utils
9b23f5b
removed foreignkey from agent to hardwareGroup becasue of bug
d173c1c
updated frontend
4194533
uncommented the ttl
17c8956
Removed foreignkey from agent to hardwareGroup in updatescript becaus…
cf390fd
Added crackerBinary to cached benchmarks
579c8f9
Formatted the hardware of the benchmark prettier in the frontend
164bc95
Added the crackerbinary to the benchmark frontend
dec578c
Fixed bug in commandline parameters parsing where arguments in format…
a99be7d
made small changes to hardwareGroupUtils
a835fd0
Added tests for the benchmarks
8be58e5
Fixed bug where hardware wasnt properly shown in agent detail page
91330df
Added the needed utils to the run.php test file
929350b
Added the benchmark cache to the menu
973d64d
Removed accidently created files
741a901
Removed more accidently created files
a4ec3fc
Merge branch 'master' into master
jessevz 85ade75
Removed old comments
d15498c
Updated codestyle in benchmarkUtils
ecff047
Added docStrings in benchmarkUtils
502dbe1
Made the update script working
a1b04d6
removed comments from install script and renamed update script to cor…
2d13640
Made benchmarkcache ttl conifgurable by using the configs
5b769de
Added efault hardwaregroup so that foreignkey constraint wouldnt fail…
7b31337
Added default hardwaregroup so that foreignkey constraint wouldnt fai…
864693e
Added the option to disable caching by setting ttl to 0
580a08d
Added the changes to the changelog
3849695
cleaned up benchmark handler
cdcecc3
Updated code based on code review
4798414
Added accidently removed code
5cca11a
Made the benchmark cache also use the agent specific CMD parameters
5d30ad2
Fixed benchmarktests
18dbd90
Fixed agent API
dd03d7d
Added code to make benchmark working with new ui and API v2
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Removed old comments
- Loading branch information
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,42 +12,42 @@ | |
} | ||
|
||
//change Agent table | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this should not be commented out? Otherwise I think this would break existing installations as the Agent table would not be as expected with the benchmark caching code. The same probably applies for the Benchmark table and the adding of the foreign key constraints. |
||
Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Agent` | ||
DROP COLUMN devices; | ||
"); | ||
Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Agent` | ||
ADD COLUMN hardwareGroupId INT(11) DEFAULT NULL; | ||
"); | ||
Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Agent` ADD CONSTRAINT FOREIGN KEY (`hardwareGroupId`) REFERENCES `HardwareGroup` (`hardwareGroupId`);"); | ||
|
||
|
||
if (!Util::databaseTableExists("Benchmark")) { | ||
Factory::getAgentFactory()->getDB()->query("CREATE TABLE `Benchmark` ( | ||
`benchmarkId` INT(11) NOT NULL, | ||
`benchmarkValue` VARCHAR(256) NOT NULL, | ||
`hardwareGroupId` INT(11) NOT NULL, | ||
`crackerBinaryId` INT(11) NOT NULL, | ||
`attackParameters` VARCHAR(512) NOT NULL, | ||
`ttl` INT(11) NULL, | ||
`hashMode` INT(11) NULL, | ||
`benchmarkType` VARCHAR(10) NULL | ||
) ENGINE=InnoDB;" | ||
); | ||
|
||
Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Benchmark` MODIFY `benchmarkId` int(11) NOT NULL AUTO_INCREMENT;"); | ||
|
||
Factory::getAgentFactory()->getDB()->query(" | ||
ALTER TABLE `Benchmark` | ||
ADD PRIMARY KEY (`benchmarkId`);"); | ||
// ADD KEY `hardwareGroupId` (`hardwareGroupId`);"); | ||
|
||
Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Benchmark` | ||
ADD CONSTRAINT `Benchmark_ibfk_1` FOREIGN KEY (`hardwareGroupId`) REFERENCES `HardwareGroup` (`hardwareGroupId`);"); | ||
} | ||
|
||
// Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Agent` ADD CONSTRAINT `Agent_ibfk_2` | ||
// Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Agent` | ||
// DROP COLUMN devices; | ||
// "); | ||
// Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Agent` | ||
// ADD COLUMN hardwareGroupId INT(11) DEFAULT NULL; | ||
// "); | ||
// Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Agent` ADD CONSTRAINT FOREIGN KEY (`hardwareGroupId`) REFERENCES `HardwareGroup` (`hardwareGroupId`);"); | ||
|
||
|
||
// if (!Util::databaseTableExists("Benchmark")) { | ||
// Factory::getAgentFactory()->getDB()->query("CREATE TABLE `Benchmark` ( | ||
// `benchmarkId` INT(11) NOT NULL, | ||
// `benchmarkValue` VARCHAR(256) NOT NULL, | ||
// `hardwareGroupId` INT(11) NOT NULL, | ||
// `crackerBinaryId` INT(11) NOT NULL, | ||
// `attackParameters` VARCHAR(512) NOT NULL, | ||
// `ttl` INT(11) NULL, | ||
// `hashMode` INT(11) NULL, | ||
// `benchmarkType` VARCHAR(10) NULL | ||
// ) ENGINE=InnoDB;" | ||
// ); | ||
|
||
// Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Benchmark` MODIFY `benchmarkId` int(11) NOT NULL AUTO_INCREMENT;"); | ||
|
||
// Factory::getAgentFactory()->getDB()->query(" | ||
// ALTER TABLE `Benchmark` | ||
// ADD PRIMARY KEY (`benchmarkId`);"); | ||
// // ADD KEY `hardwareGroupId` (`hardwareGroupId`);"); | ||
|
||
// Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Benchmark` | ||
// ADD CONSTRAINT `Benchmark_ibfk_1` FOREIGN KEY (`hardwareGroupId`) REFERENCES `HardwareGroup` (`hardwareGroupId`);"); | ||
// } | ||
|
||
// // Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Agent` ADD CONSTRAINT `Agent_ibfk_2` | ||
// // FOREIGN KEY (`hardwareGroupId`) REFERENCES `HardwareGroup` (`hardwareGroupId`);"); | ||
// Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Benchmark` ADD CONSTRAINT `Benchmark_ibfk_1` | ||
// FOREIGN KEY (`hardwareGroupId`) REFERENCES `HardwareGroup` (`hardwareGroupId`);"); | ||
Factory::getAgentFactory()->getDB()->query("ALTER TABLE `Benchmark` ADD CONSTRAINT `Benchmark_ibfk_1` | ||
FOREIGN KEY (`hardwareGroupId`) REFERENCES `HardwareGroup` (`hardwareGroupId`);"); | ||
|
||
?> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the release is not fixed and in preparation, the update files typically are named ./update_v0.14.x_v0.x.x.php.