Giter Site home page Giter Site logo

tarscloud / tarsjmeter Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 4.0 5.3 MB

The bridge connecting JMeter and Tars, it ensures that people can efficiently use JMeter to complete the stress test of Tars microservices

License: BSD 3-Clause "New" or "Revised" License

Java 100.00%
jmeter jmeter-plugin tars-foundation

tarsjmeter's People

Contributors

boycs007 avatar dependabot[bot] avatar jnlunsb avatar juliuslu-tencent avatar tarscloudbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tarsjmeter's Issues

A Issue for Dependent Libraries Collection

If you find any dependent libraries in code but never display its open source license in the License file, please comment on this issue, We will update the License file ASAP.
You also can pull request to the License file and remember to describe in detail ; )

Welcome to contribute!

tars2json的转换不应该局限于struct结构

偶尔会有人这么在接口中这么写
int add(map<string,vector> tReqs ,out RelationRsp tRsp);
如果想要组合出treqs还是需要手动的写大量json,因此tars2json的入口应该是某个接口的参数名

private String getStruct(String prefix, TarsType type, List<TarsNamespace> namespaces) {
	StringWriter sw = new StringWriter();
	PrintWriter out = new PrintWriter(sw);
	if (isTypeAtomic(type)) {
		printPrimitive(out, prefix, "", 0, type, namespaces);
	} else if (type.isVector()) {
		printVector(out, prefix, "", 0, type, namespaces);
	} else if (type.isMap()) {
		printMap(out, prefix, "", 0, type, namespaces);
	} else {
		String structName = type.typeName();
		for (TarsNamespace ns : namespaces) {
			for (TarsStruct s : ns.structList()) {
				if (!structName.isEmpty() && !structName.equals(s.structName())) {
					continue;
				}
				int index = 0;
				for (TarsStructMember m : s.memberList()) {
					index++;
					if (index > 1) {
						out.println(",");
					}
					TarsType memberType = m.memberType();
					if (isTypeAtomic(memberType)) {
						printPrimitive(out, prefix, m.memberName(), m.tag(), memberType, namespaces);
					} else if (memberType.isVector()) {
						printVector(out, prefix, m.memberName(), m.tag(), memberType, namespaces);
					} else if (memberType.isMap()) {
						printMap(out, prefix, m.memberName(), m.tag(), memberType, namespaces);
					} else {
						printTars(out, prefix, m.memberName(), m.tag(), memberType, namespaces);
					}
				}
			}
		}
	}
	return sw.toString();
}

改法类似这样。

关于tar2json协议的设计的疑问

为什么不能做直接的转换,用jce+json(http那种)映射,而是要一个比较复杂的json嵌套(虽然可以省掉jce文件的读入)

毕竟需要tars2json转换的时候,还是需要jce文件

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.