Skip to content

Instantly share code, notes, and snippets.

View tomatolog's full-sized avatar

Stas tomatolog

View GitHub Profile
Function Name Inclusive Samples Exclusive Samples Inclusive Samples % Exclusive Samples % Module Name
CSphKBufferMVAGroupSorter<MatchGeneric5_fn,0,1>::Push 5 396 2 99,87 0,04
CSphKBufferGroupSorter<MatchGeneric2_fn,1,0>::PushEx 5 390 15 99,76 0,28
CSphKBufferGroupSorter<MatchGeneric2_fn,1,0>::CutWorst 5 359 0 99,19 0,00
sphSort<SphGroupedValue_t,SphLess_T<SphGroupedValue_t>,SphAccessor_T<SphGroupedValue_t> >
4 975 4 975 92,08 92,08
@tomatolog
tomatolog / gist:8348545
Last active January 2, 2016 19:09 — forked from kevgs/gist:8343057
import MySQLdb
import sys
db = MySQLdb.connect(host='0', port=9306)
c = db.cursor()
for i in range(100):
print ( "pre limit " + sys.argv[1] + " " + datetime.datetime(1970, 1, 1) )
c.execute("""SELECT 1234, 1235 FROM goods_main limit %s""" % sys.argv[1])
print ( "pre limit " + sys.argv[1] + " " + datetime.datetime(1970, 1, 1) )
// check if key matches
int iNameLen = sphJsonUnpackInt ( &p );
if ( iNameLen==tKey.m_iLen && !memcmp ( tKey.m_sKey.cstr(), p, tKey.m_iLen ) )
vs
return JSON_EOF;
}
@tomatolog
tomatolog / gist:4721022
Created February 6, 2013 07:49
more info on large spa fail
--- a/src/sphinx.cpp 2013-02-06 11:48:18.000000000 +-0400
+++ b/src/sphinx.cpp 2013-02-06 11:47:57.000000000 +-0400
@@ -15405,13 +15405,14 @@
m_pDocinfoIndex = m_pDocinfo.GetWritePtr()+iDocinfoSize;
} else
{
if ( iDocinfoSize < iRealDocinfoSize )
{
- m_sLastError.SetSprintf ( "precomputed chunk size check mismatch" );
@tomatolog
tomatolog / gist:4073084
Created November 14, 2012 16:21
additional report on spa loading failed
--- src\sphinx.cpp
+++ src\sphinx.cpp
@@ -680,14 +680,14 @@
}
if ( bCheckSizeT )
{
size_t sCheck = (size_t)st.st_size;
if ( st.st_size!=SphOffset_t(sCheck) )
{
- sError.SetSprintf ( "failed to load %s: bad size "INT64_FMT" (out of size_t; 4 GB limit on 32-bit machine hit?)",
diff --git a/src/sphinxsearch.cpp b/src/sphinxsearch.cpp
index 7919117..d1276dd 100644
--- a/src/sphinxsearch.cpp
+++ b/src/sphinxsearch.cpp
@@ -510,16 +510,6 @@ class FSMphrase
protected:
struct State_t
{
- State_t ()
- {