-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add sharding calculator #584
base: main
Are you sure you want to change the base?
Conversation
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.
please add changes.txt entry
app/conf/plugins.json
Outdated
} | ||
} | ||
}, { | ||
"name": "testing", |
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.
This testing section doesn't seem used, please remove it
app/plugins/tutorial/calculator.js
Outdated
// time is measured in hours | ||
|
||
angular.module('calculator', ['sql', 'translation']).controller('CalculatorController', function($scope, SQLQuery, queryResultToObjects) { | ||
$scope.diskLoadFactor = 0.85; |
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.
only attach the variables that are needed in the HTML view to the $scope. Otherwise it causes poor performance
$scope.selectTable = "none"; | ||
$scope.selected = "none"; | ||
|
||
$scope.selectedRAM = function (){ |
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.
same for the fuctions
app/plugins/tutorial/calculator.js
Outdated
var stmt = "select sum(size) from sys.shards where schema_name = '" + schemaName | ||
+ "'and table_name = '"+tableName+"' and primary=true;"; | ||
SQLQuery.execute(stmt, {}, false, false, false, false).then(function (query) { | ||
if ((query.rows[0])[0]==null){ |
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.
use ===
app/plugins/tutorial/calculator.js
Outdated
+schemaName+"' and table_name = '"+tableName+"';"; | ||
SQLQuery.execute(stmt, {}, false, false, false, false).then(function (query) { | ||
rep = (query.rows[0])[0]; | ||
console.log("^^^^^^^^^^^^^^^^^ "+ $scope.replicas); |
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.
remove console.logs
app/plugins/tutorial/testing.html
Outdated
@@ -0,0 +1,21 @@ | |||
<div ng-app="testing" ng-controller="testingController"> |
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.
please remove testing.html
app/plugins/tutorial/testing.js
Outdated
@@ -0,0 +1,42 @@ | |||
'use strict'; |
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.
please remove this file if not
sharding-calculator is finalized.
Joe told us to request someone to look over it.
So it can be thought about, if it should actually be used.