Skip to content

Instantly share code, notes, and snippets.

@premkumr
premkumr / yugabytedb_release_notest_prompt.txt
Last active April 24, 2024 23:20
YugabyteDB Release Notes Prompt for LLM
You are a summary generator for a YugabyteDB code change. The summary will go as an item into a list of many other summaries.
The details will be given as blocks of text for only one issue. The summary should use simple words with clear and
concise grammar and be user-focused.
When asked for a simple summary, the summary should be within 150 characters. When asked for a detailed summary,
add more details, but keep the summary within 500 characters. You should give only the summary that is asked for and not both.
Avoid details of implementation or code changes and any autoflag details but include any other specific GFlag or
configuration adjustments and preserve the tick marks. The sentences should NOT include the subject
(e.g. issue, change, fix, summary, YugabyteDB, or the release) but emphasize how the change will benefit the user.
@premkumr
premkumr / yb
Created August 6, 2023 00:53
create a 3-node yb cluster
#!/bin/bash
debug=1
# base directry where the data will be stored - ${HOME}/var/node1, ${HOME}/var/node2, ${HOME}/var/node3 ..
BASEDIR=${HOME}/var/node
# location of yb repo - eg yugabyte-2.13.2.0
VERSIONBASE=${HOME}/software
@premkumr
premkumr / metrics.py
Created March 31, 2023 19:15
Fetch yb metrics
#!/usr/bin/env python
import argparse
import copy
import json
import os
import re
import shelve
import sys
import tempfile
import time
@premkumr
premkumr / buckt.arena.cpp
Last active March 24, 2017 23:09
Output of 20 Buckets in 20 Arenas as the destuct
// command
laptop::couchbase/build/ep-engine:> ARENA_STATS=1 ../memcached/engine_testapp -E ./ep.so -T ./ep_testsuite.so -e item_eviction_policy=full_eviction -C 151
/**
* 21 arenas, 20 buckets.
* 0 : is system arena, 1-20 are for buckets.
* This is the output after each bucket is destructed
* arenaid : no.of threads : size in the arena
*
* The last line if state just before the process is shutdown.
function clone(o) {
return JSON.parse(JSON.stringify(o));
}
function insert_fds_button(imageAttributes, params){
// check for the correct page
if (! (!!document.querySelector(params.existsInPage))) {
return;
}
var img = document.createElement('img'),
@premkumr
premkumr / prem.gitconfig
Last active August 29, 2015 14:06
Git aliases
[user]
name = Premkumar
email = prem@formationds.com
[alias]
unpushed = log --stat @{u}..
unpushedall = log --stat origin/master..HEAD
# commits in short form
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
# commits showing changed files
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
@premkumr
premkumr / ipython.init.py
Last active August 29, 2015 14:06
prems ipython init.py
import os
import re
import sys
import time
import requests
FDSSOURCEDIR="/home/premkumar/repos/fds-src/source"
sys.path.append('/home/premkumar/bin')
sys.path.append(FDSSOURCEDIR + '/test/fdslib')
sys.path.append(FDSSOURCEDIR + '/test/fdslib/pyfdsp')
@premkumr
premkumr / netexec.cpp
Last active August 29, 2015 14:01
lambda macro
#define NETEXEC(comm, ...) \
[&] { \
try { \
__VA_ARGS__ ; \
return true; \
catch(TException e) { \
comm.handleError(e); \
return false; \
} \
}();
@premkumr
premkumr / Network-try-catch
Last active August 29, 2015 13:57
Try catch around all network calls
// att & atc are defined in Netsession.h
try {
netDataPathClientSession *sessionCtx = getClientSession<> ... (); ...
boost::shared_ptr<FDSP_DataPathReqClient> client = sessionCtx->getClient();
client->GetObject or any network call
} catch(const att::TTransportException& e) {
LOGERROR << "error during network call : " << e.what();
}