Skip to content

Instantly share code, notes, and snippets.

@raksit31667
raksit31667 / index.js
Created November 26, 2018 15:55
Jaeger Node.js Barcamp
const core = require('@opencensus/core')
const tracing = require('@opencensus/nodejs')
const propagation = require('@opencensus/propagation-b3')
const jaeger = require('@opencensus/exporter-jaeger')
const b3 = new propagation.B3Format()
var jaegerOptions = {
serviceName: 'node-jaeger-bcbk9',
host: 'localhost',
port: 6832,
plugins {
id 'org.springframework.boot' version '2.2.2.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'org.unbroken-dome.test-sets' version '2.2.1'
id 'java'
}
group = 'com.raksit'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
package com.raksit.example.order
import io.gatling.core.Predef._ // required for Gatling core structure DSL
import io.gatling.http.Predef._ // required for Gatling HTTP DSL
import io.gatling.http.protocol.HttpProtocolBuilder
object PerformanceTestConfiguration {
private val serviceUrl = System.getProperty("service.url", "http://localhost:8080")
val httpConfiguration: HttpProtocolBuilder = http.baseUrl(serviceUrl)
@raksit31667
raksit31667 / build.gradle
Created January 26, 2020 08:37
Gatling dependency
plugins {
id 'com.github.lkishalmi.gatling' version '3.2.9'
}
gatling {
toolVersion = '3.3.1'
scalaVersion = '2.12.10'
}
sourceSets {
@raksit31667
raksit31667 / FindOrderByIdSimulation.scala
Last active February 5, 2020 10:49
Example simulation
package com.raksit.example.order
import com.raksit.example.order.PerformanceTestConfiguration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
class FindOrderByIdSimulation extends Simulation {
private val testDataFeed = csv("orderIds.csv").circular
@raksit31667
raksit31667 / orderIds.csv
Last active January 26, 2020 08:40
Example Gatling feed
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
orderId
10
11
12
@raksit31667
raksit31667 / 📊 Weekly development breakdown
Last active June 30, 2024 00:34
📊 Weekly development breakdown
Markdown 4 hrs 39 mins ████████████████▋░░░░ 79.4%
Other 1 hr 10 mins ████▏░░░░░░░░░░░░░░░░ 20.1%
Vue.js 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.2%
JavaScript 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.2%
global
maxconn 4096
defaults
log global
mode tcp
timeout connect 5000
timeout client 50000
timeout server 50000
global
maxconn 4096
defaults
log global
mode http
option httplog
option dontlognull
option redispatch
retries 3
@raksit31667
raksit31667 / build.gradle
Last active March 7, 2020 08:37
Spring Kafka
dependencies {
implementation 'org.springframework.kafka:spring-kafka:2.4.1.RELEASE'
compileOnly "org.springframework.boot:spring-boot-configuration-processor"
testImplementation 'org.springframework.kafka:spring-kafka-test:2.4.1.RELEASE'
}