GithubHelp home page GithubHelp logo

yalehu / fuzz_debug_platform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fuzzdebugplatform/fuzz_debug_platform

0.0 1.0 0.0 5.47 MB

Makefile 0.25% Go 36.44% Yacc 23.52% HTML 2.57% CSS 5.11% JavaScript 31.91% Dockerfile 0.20%

fuzz_debug_platform's Introduction

SqlDebug

Toy Arount with It by Docker Compose

You should install Docker Compose on your computer first.

$ git clone https://github.com/fuzzdebugplatform/docker-compose.git
$ cd docker-compose
$ docker-compose up -d
Creating docker-compose_pltform_1 ... done
Creating docker-compose_tw_1      ... done
Creating docker-compose_mysql_1   ... done

The test above is about window functions, with yy file exampleyy/windows.yy.

You can use docker logs -f to see test process:

$ docker logs docker-compose_pltform_1
2019/12/17 11:49:35 staring prepare data in db
2019/12/17 11:49:53 prepare data in db ok
2019/12/17 11:49:53 tidb statistic funtion open ok
2019/12/17 11:49:53 starting generate query
2019/12/17 11:50:04 fuzz ok

When you see "fuzz ok", you can open localhost:43000 to see analysis(you can alse open this page in advance, but you'd better flush the page after fuzz ok):

quick experience

If you want to rerun it, please clear them first:

$ docker-compose stop
$ docker-compose rm

Run with Binary

  • First, you should wrap the tidb version you are interesting with tidb-wrapper

  • config tidb source dir in config/config.go(must consistent with wrapped tidb)

var defaultConf = Config{
	TiDBSourceDir:        "/home/dqyuan/append/language/Go/projects/hackthon/tidb-bad/",
	TiDBTraceServerAddr:  "http://localhost:43222/trace/",
	TopN:                 10000,
	FailureRateThreshold: 0.7,
}
  • start a wrapped tidb
tidb-bad-wrapper$ ./bin/tidb-server -path testdb
  • start a normal tidb (another version)
tidb-good$ ./bin/tidb-server -P 4001 -path testdb
  • build web page
cd web
yarn run build
  • run test
./bin/platform -Y exampleyy/subquery_test.yy --dsn1 "root:@tcp(127.0.0.1:4000)/randgen"  --dsn2 "root:@tcp(127.0.0.1:4001)/randgen" -Q 100 --debug -W "web/build"

visit localhost:3000 to see analysis.

fuzz_debug_platform's People

Contributors

dqinyuan avatar baurine avatar robbie-han avatar mahjonp avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.