Skip to content

Instantly share code, notes, and snippets.

View boris-42's full-sized avatar
:octocat:

Boris Pavlovic boris-42

:octocat:
View GitHub Profile
[
{
"id": "896f5e52-d4c9-11e3-a117-46c0b36ac153",
"metadata": {
"base_id": "f5587500-07d1-41a0-b434-525d3c28ac49",
"event_type": "profiler.nova",
"host": "osapi_compute.0.0.0.0",
"name": "WSGI-stop",
"parent_id": "82281b35-63aa-45fc-8578-5a32a66370ab",
"trace_id": "837eb0bd-323a-4e3f-b223-3be78ad86aab"
{
"info": {
"started": 0,
"finished": 14029,
"name": "total"
},
"children": [{
"info": {
"name": "WSGI",
"service": "nova",
class PersistanceContextManager(object):
def create():
# prepare list_of_ctx
# self._create(list)
created_ctxt = []
try:
for ctx in list_of_ctx:
created_ctxt.append(ctx)
from keystoneclient.v2_0 import client as keystone
from ceilometerclient import client as ceilometer
#CREDENTIALS
auth_url = "http://172.16.52.152:5000/v2.0"
username = "admin"
tenant_name = "admin"
password = "admin"
#GET CEILOMETER CLIENT
{
"<TestName1>": [
{"context": {}, "args": {}, "runner": {}},
{"context": {}, "args": {}, "runner": {}},
{"context": {}, "args": {}, "runner": {}}
],
"<TestName2>": [
{"context": {}, "args": {}, "runner": {}},
{"context": {}, "args": {}, "runner": {}}
@boris-42
boris-42 / gist:7a0eb24ee4ce6fbca6e9
Last active August 29, 2015 14:03
Test a Keystone profiling stuff
from osprofiler import profiler
from osprofiler.parsers import ceilometer as ceilo_parser
from keystoneclient.v2_0 import client as keystone
from ceilometerclient import client as ceilometer
#CREDENTIALS
auth_url = "http://172.16.52.152:5000/v2.0"
username = "admin"
@boris-42
boris-42 / gist:6319bd8a2532913f0967
Created July 8, 2014 22:33
local.conf for devstack
ENABLED_SERVICES+=,ceilometer-acompute,ceilometer-acentral,ceilometer-anotification,ceilometer-collector
ENABLED_SERVICES+=,ceilometer-alarm-evaluator,ceilometer-alarm-notifier
ENABLED_SERVICES+=,ceilometer-api
CEILOMETER_NOTIFICATION_TOPICS="notifications,profiler"
# This should be in context/vm/base.py
class VMBenchmarkImagePrepare(base.Context):
def _prepare(self):
pass
def setup(self):
# run VM with image
# wait unit it starts
self._prepare()
@boris-42
boris-42 / gist:67f0d5ce3ffadd27170f
Created August 1, 2014 14:10
Multiple patches git & gerrit
# Some useful tips with gerrit:
# Work on your changes always in specific branch:
$ git checkout master
$ git checkout -b your_branch
# Rebasing your patches:
Models In DB:
class TaskResultChunk (M iterations per chunk)
task_uuid
data = Text()