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
import re | |
import cassandra | |
from cassandra.protocol import cython_protocol_handler | |
def name_from_module(module): | |
return module.__name__.split(".")[1] | |
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
from cassandra.cluster import Cluster | |
from cassandra.concurrent import execute_concurrent, query_by_keys | |
from cassandra.policies import TokenAwarePolicy, DCAwareRoundRobinPolicy | |
from itertools import repeat, cycle | |
from collections import defaultdict | |
import time | |
import six | |
from bokeh.plotting import figure, output_file, show | |
cluster = Cluster(load_balancing_policy=TokenAwarePolicy(DCAwareRoundRobinPolicy(), shuffle_replicas=False)) |
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
import cProfile, pstats, StringIO | |
from itertools import cycle | |
from cassandra.concurrent import execute_concurrent | |
from cassandra.cluster import Cluster | |
concurrency = 50 | |
TABLE = "testtable" | |
KEYSPACE = "testkeyspace" |
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
from dse_graph import DseGraph, graph_traversal_row_factory | |
from dse_graph.serializers import IntegerSerializer | |
from dse.cluster import EXEC_PROFILE_GRAPH_DEFAULT, EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT | |
from gremlin_python.structure.io.graphson import GraphSONUtil | |
from dse.cluster import Cluster | |
cluster = Cluster() |
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
import asyncore, socket | |
import time | |
_dispatcher_map = {} | |
def create_socket(): | |
host = "127.0.0.1" | |
port = 5007 | |
addresses = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM) | |
sockerr = None |
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
from cassandra.cluster import Cluster | |
cluster = Cluster() | |
def context(): | |
session = cluster.connect(wait_for_all_pools=True) | |
context() | |
for connections in [o.get_connections() for o in cluster.get_connection_holders()]: |
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
import time | |
import logging | |
from cassandra.cluster import Cluster | |
from cassandra.policies import RoundRobinPolicy | |
from tests.integration.simulacron.utils import SimulacronClient, PrimeOptions | |
from tests.integration.simulacron.utils import SimulacronServer, prime_cluster, NO_THEN |
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
import asyncore, socket | |
from threading import Thread, Event | |
_dispatcher_map = {} | |
class Client(asyncore.dispatcher): | |
def __init__(self, host, port, message): | |
self._event = Event() | |
self.message = message |
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
import time | |
from ccmlib.cluster import Cluster as CCMCluster | |
from cassandra.io.asyncorereactor import AsyncoreConnection | |
from cassandra.io.libevreactor import LibevConnection | |
from cassandra import ConsistencyLevel | |
from cassandra.protocol import QueryMessage | |
import logging | |
connection_class = AsyncoreConnection |
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
import time | |
import concurrent.futures | |
import resource | |
from guppy import hpy | |
import weakref | |
class Object: | |
pass | |
class BigObject(object): |
NewerOlder