This file contains hidden or 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
# To find the percentile of a combined dataset of latency values from two Redis servers, | |
# you would first need to retrieve the latency data from each server and combine it into | |
# a single dataset. | |
# Once you have the combined dataset, you can calculate the desired percentile. | |
import redis | |
from hdrh.histogram import HdrHistogram | |
# connect to shard 1 |
This file contains hidden or 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"github.com/mediocregopher/radix/v3" | |
"log" | |
"strconv" | |
"time" | |
) |
This file contains hidden or 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
fco@hpe10:~/go/src/github.com/filipecosta90/go-web-framework-benchmark$ python3 test.py \ | |
--enable-cpu-affinity --wrk-max-cpus 6 --wrk-connections 100 --pipeline-sizes 100 \ | |
--web-framework-processing-time-ms 0 --stress-rps 5000000 --output-file stress-test.json |
This file contains hidden or 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
#!/bin/bash | |
###################### | |
# time-series creation | |
###################### | |
# https://oss.redislabs.com/redistimeseries/commands/#tscreate | |
redis-cli ts.create nyse_AAPL_price RETENTION 120000 LABELS metric price name APPL | |
redis-cli ts.create nyse_GOOGL_price RETENTION 120000 LABELS metric price name GOOGL | |
redis-cli ts.create nyse_MSFT_price RETENTION 120000 LABELS metric price name MSFT | |
redis-cli ts.create nyse_APPL_size RETENTION 120000 LABELS metric size name APPL |
This file contains hidden or 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
--- | |
- name: Install BCC (BPF Compiler Collection) Package Upstream Stable | |
hosts: all | |
connection: ssh | |
become: yes | |
become_user: root | |
become_method: sudo | |
vars: | |
- bccpath: '/usr/share/bcc/tools' |
This file contains hidden or 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
#!/usr/bin/env python | |
"""Module and script to parse pub-sub events and write them to Redis hashes.""" | |
import json | |
import redis | |
from wikiutils import current_timestamp, pubsub_channel, redis_url | |
r = redis.Redis.from_url(redis_url) |
This file contains hidden or 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
#!/usr/bin/env python | |
"""Module and script to forward events from wikimedia stream to Redis pub-sub.""" | |
import asyncio as aio | |
import json | |
import aioredis | |
from aiohttp_sse_client import client as sse_client | |
from wikiutils import pubsub_channel, redis_url |
This file contains hidden or 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
#!/bin/bash | |
# script to run redis benchmark with different payload, pipeline, and iothreads ( the iothreads are configured on the redis-server VM | |
# and that argument is only for creating a different file for different redis-server configs | |
args=("$@") | |
n=${args[0]} | |
h=${args[1]} | |
iothreads=${args[2]} | |
dir=${args[3]} |
This file contains hidden or 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
fcosta_oliveira@n1-highcpu-96-redis-server-1:~/STREAM$ ./stream.100M | |
------------------------------------------------------------- | |
STREAM version $Revision: 5.10 $ | |
------------------------------------------------------------- | |
This system uses 8 bytes per array element. | |
------------------------------------------------------------- | |
Array size = 100000000 (elements), Offset = 0 (elements) | |
Memory per array = 762.9 MiB (= 0.7 GiB). | |
Total memory required = 2288.8 MiB (= 2.2 GiB). | |
Each kernel will be executed 10 times. |
This file contains hidden or 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
#!/bin/bash -x | |
redis-cli flushall | |
redis-cli module load /Users/filipeoliveira/redis-porto/RedisGears/redisgears.so | |
redis-cli module load /Users/filipeoliveira/redis-porto/RedisTimeSeries/src/redistimeseries.so | |
# Register for new cdn events | |
redis-cli -x rg.pyexecute < imageserver.py | |
# Load sample images into cdn:* keys |
NewerOlder