Skip to content

Instantly share code, notes, and snippets.

View ettomatic's full-sized avatar
🎯
Focusing

Ettore Berardi ettomatic

🎯
Focusing
View GitHub Profile
#!env ruby
require 'securerandom'
require 'optparse'
# This script generates random target URLS to be used on Vegeta load tests
# ------------------------------------------------------------------------
#
# $ vegeta_targets_generator.rb --help
# Usage: ruby target_generator.rb [options]

1 node

cat test_belfrage.txt | vegeta attack -duration=30s -rate=80 -timeout=30s -workers=20 | tee results.bin | vegeta report Requests [total, rate, throughput] 2400, 80.03, 63.61 Duration [total, attack, wait] 37.728197549s, 29.987503256s, 7.740694293s Latencies [mean, 50, 95, 99, max] 6.810573846s, 6.814303976s, 11.986469356s, 12.767811062s, 14.102109758s Bytes In [total, mean] 457107215, 190461.34 Bytes Out [total, mean] 0, 0.00 Success [ratio] 100.00%

titan2.core=> (def Brooke (tg/transact! (tv/create! {:name "Brooke"})))
#'titan2.core/Brooke
titan2.core=> (tg/transact! (tv/create! {:name "Zack"}))
#<StandardVertex v[8]>
titan2.core=> (def Zack (tg/transact! (tv/find-by-kv :name "Zack")))
titan2.core=> Brooke
#<StandardVertex v[4]>
#'titan2.core/Zack
titan2.core=> Zack
@ettomatic
ettomatic / gist:1539869
Created December 30, 2011 13:31
Error /solr on TB 2.0.0.bea1
14:26:19,972 INFO [org.jboss.as] (Controller Boot Thread) JBoss AS 7.1.0.Beta1 "Tesla" started in 7300ms - Started 152 of 221 services (68 services are passive or on-demand)
14:26:48,761 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "solr.war"
14:26:50,611 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-2) No /solr/home in JNDI
14:26:50,612 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-2) using system property solr.solr.home: /opt/solr/
14:26:50,612 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-2) Solr home set to '/opt/solr/'
14:26:50,755 INFO [org.apache.solr.servlet.SolrDispatchFilter] (MSC service thread 1-2) SolrDispatchFilter.init()
14:26:50,756 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-2) No /solr/home in JNDI
14:26:50,756 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-2) using system property solr.solr.home: /opt/solr/
14:26:50,757 INFO [o
@ettomatic
ettomatic / gist:1539853
Created December 30, 2011 13:27
Solr 3.5 deployment on Torqubox 2.0.0.beta1
14:26:19,972 INFO [org.jboss.as] (Controller Boot Thread) JBoss AS 7.1.0.Beta1 "Tesla" started in 7300ms - Started 152 of 221 services (68 services are passive or on-demand)
14:26:48,761 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "solr.war"
14:26:50,611 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-2) No /solr/home in JNDI
14:26:50,612 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-2) using system property solr.solr.home: /opt/solr/
14:26:50,612 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-2) Solr home set to '/opt/solr/'
14:26:50,755 INFO [org.apache.solr.servlet.SolrDispatchFilter] (MSC service thread 1-2) SolrDispatchFilter.init()
14:26:50,756 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-2) No /solr/home in JNDI
14:26:50,756 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-2) using system property solr.solr.home: /opt/solr/
14:26:50,757 INFO [o
@ettomatic
ettomatic / module.xml
Created December 30, 2011 13:25
modified TB cache module.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2010, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
@ettomatic
ettomatic / gist:1539763
Created December 30, 2011 13:06
Torquebox 2.0.0.beta1 error on Solr 3.5 deployment
14:04:05,044 INFO [org.jboss.as] (Controller Boot Thread) JBoss AS 7.1.0.Beta1 "Tesla" started in 7956ms - Started 152 of 221 services (68 services are passive or on-demand)
14:04:28,279 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "solr.war"
14:04:30,045 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-1) No /solr/home in JNDI
14:04:30,045 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-1) using system property solr.solr.home: /opt/solr/
14:04:30,045 INFO [org.apache.solr.core.SolrResourceLoader] (MSC service thread 1-1) Solr home set to '/opt/solr/'
14:04:30,064 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/solr]] (MSC service thread 1-1) Exception starting filter SolrRequestFilter: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:157) [jboss-as-ee-7.1.0.Beta1.jar:]
a
@ettomatic
ettomatic / solr_slf4j_binding.xml
Created July 30, 2011 13:18
jboss solr slf4j binding
13:43:09,449 ERROR [STDERR] SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.
13:43:09,449 ERROR [STDERR] SLF4J: Your binding is version 1.5.5 or earlier.
13:43:09,449 ERROR [STDERR] SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x
@ettomatic
ettomatic / jboss_solr_encoding.xml
Created July 30, 2011 12:21
JBoss & Solr - encoding
<!-- A HTTP/1.1 Connector on port 8080 -->
<Connector protocol="HTTP/1.1" port="${jboss.web.http.port}" address="${jboss.bind.address}"
redirectPort="${jboss.web.https.port}" URIEncoding="UTF-8" />
@ettomatic
ettomatic / jBoss_solr_home.xml
Created July 30, 2011 12:18
Solr & JBoss - set Solr home
<attribute name="Properties">
solr.solr.home=/srv/solr
solr.data.dir=/srv/solr/data
</attribute>