コード例 #1
0
ファイル: cb_hadoop_report.py プロジェクト: Leonid99/cbtool
def main() :
    
    _mr_latency = False
    _hadoop_log_file_name = file_list(argv[1], argv[2])
    if _hadoop_log_file_name :
        _hadoop_file_contents = read_file(argv[1], _hadoop_log_file_name)
        if _hadoop_file_contents :
            _mr_latency, _totlatency = parsefile(_hadoop_file_contents)

    _my_ip = get_my_ip()

    _my_uuid = get_uuid_from_ip(_my_ip)
    
    _metric_list = ''
    
    for _arg in argv :
        if _arg.count(":") == 2 :
            _metric_list += _arg + ' '
    
    if _mr_latency:
        _metric_list += "latency:" + str(_totlatency) + ":msec latency_mr:" + str(_mr_latency) + ":msec"

    report_app_metrics(_my_uuid, _metric_list)
コード例 #2
0
ファイル: cb_hadoop_report.py プロジェクト: vermavis/cbtool
def main() :
    
    _mr_latency = False
    _hadoop_log_file_name = file_list(argv[1], argv[2])
    if _hadoop_log_file_name :
        _hadoop_file_contents = read_file(argv[1], _hadoop_log_file_name)
        if _hadoop_file_contents :
            _mr_latency, _totlatency = parsefile(_hadoop_file_contents)

    _my_ip = get_my_ip()

    _my_uuid = get_uuid_from_ip(_my_ip)
    
    _metric_list = ''
    
    for _arg in argv :
        if _arg.count(":") == 2 :
            _metric_list += _arg + ' '
    
    if _mr_latency:
        _metric_list += "latency:" + str(_totlatency) + ":msec latency_mr:" + str(_mr_latency) + ":msec"

    report_app_metrics(_my_uuid, _metric_list)
コード例 #3
0
# See the License for the specific language governing permissions and
# limitations under the License.
#/*******************************************************************************

from sys import argv, path
import os
import re

path.append(
    re.compile(".*\/").search(os.path.realpath(__file__)).group(0) + "/../../")

from scripts.common.cb_common import report_app_metrics

_metric_list = ''
_sla_target_list = ''

_force_conversion = None

for _arg in argv:
    if _arg.count("sla_runtime_target"):
        _sla_target_list = _arg.replace(',', ' ')
    elif _arg.count("force_conversion_"):
        _force_conversion = _arg.replace("force_conversion_", '')
    else:
        if _arg.count(":") == 2:
            _metric_list += _arg + ' '

report_app_metrics(_metric_list,
                   _sla_target_list,
                   force_conversion=_force_conversion)
コード例 #4
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/*******************************************************************************

from sys import argv, path

import os
import fnmatch

_home = os.environ["HOME"]

for _path, _dirs, _files in os.walk(os.path.abspath(_home)):
    for _filename in fnmatch.filter(_files, "code_instrumentation.py"):
        path.append(_path.replace("/lib/auxiliary", ''))
        break

from scripts.common.cb_common import report_app_metrics

#_osci, _my_uuid = get_os_conn()

_metric_list = ''

for _arg in argv:
    if _arg.count(":") == 2:
        _metric_list += _arg + ' '

report_app_metrics(_metric_list)
コード例 #5
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/*******************************************************************************

from sys import argv, path                                                                                            
import os
import re
            
path.append(re.compile(".*\/").search(os.path.realpath(__file__)).group(0) + "/../../")                               
            
from scripts.common.cb_common import report_app_metrics                                                               
            
_metric_list = ''                                                                                                     
_sla_target_list = ''

_force_conversion = None

for _arg in argv :
    if _arg.count("sla_runtime_target") :
        _sla_target_list = _arg.replace(',',' ')
    elif _arg.count("force_conversion_") :
        _force_conversion = _arg.replace("force_conversion_",'')
    else :
        if _arg.count(":") == 2 :                                                                                                 
            _metric_list += _arg + ' '                                                                                    

report_app_metrics(_metric_list, _sla_target_list, force_conversion = _force_conversion)
コード例 #6
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/*******************************************************************************

from sys import argv, path

import os
import fnmatch

_home = os.environ["HOME"]

for _path, _dirs, _files in os.walk(os.path.abspath(_home)):
    for _filename in fnmatch.filter(_files, "code_instrumentation.py") :
        path.append(_path.replace("/lib/auxiliary",''))
        break

from scripts.common.cb_common import report_app_metrics

#_osci, _my_uuid = get_os_conn()

_metric_list = ''

for _arg in argv :
    if _arg.count(":") == 2 :
        _metric_list += _arg + ' '

report_app_metrics(_metric_list)