Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 20
- TINGYUN 2015-08-21 19:34:42 +08:00
- @glasslion 同学提抄袭这词有些严肃啊,那就认真的回复下这个质疑(明明上面的回复也很认真)@Strikeactor @beordle @zjxubinbin @alsotang
- 首先,听云绝对不会抄袭的。
- 听云和 New Relic 都是基于第三方的开源模块 wrapt ,加自主研发。两家都大量借用了 wrapt, requests 模块相关功能。某一语言的探针的监测原理是一样的,基于开源组件,部分源码有重叠,是自然的事情。
- 下面是三段听云和 New Relic 核心代码的对照。
- tingyun-hooks_entrance.py
- //i.v2ex.co/d0c12Dn1.png
- //i.v2ex.co/TVII4A7b.png
- newrelic-weib_transaction.py
- import sys
- import cgi
- import base64
- import time
- import string
- import re
- import json
- import logging
- try:
- import urlparse
- except ImportError:
- import urllib.parse as urlparse
- import newrelic.packages.six as six
- import newrelic.api.application
- import newrelic.api.transaction
- import newrelic.api.object_wrapper
- import newrelic.api.function_trace
- _logger = logging.getLogger (__name__)
- _rum_header_fragment = '<script type="text/javascript">' \
- 'var NREUMQ=NREUMQ||[];NREUMQ.push (["mark","firstbyte",' \
- 'new Date ().getTime ()]);</script>'
- _rum_footer_short_fragment = '<script type="text/javascript">' \
- 'if (!NREUMQ.f ){NREUMQ.f=function (){NREUMQ.push (["load",' \
- 'new Date ().getTime ()]);if (NREUMQ.a )NREUMQ.a ();};' \
- 'NREUMQ.a=window.onload;window.onload=NREUMQ.f;};' \
- 'NREUMQ.push (["nrf2","%s","%s","%s","%s",%d,%d,' \
- 'new Date ().getTime ()]);</script>'
- _rum2_footer_short_fragment = '<script type="text/javascript">' \
- 'if (!NREUMQ.f ){NREUMQ.f=function (){NREUMQ.push (["load",' \
- 'new Date ().getTime ()]);if (NREUMQ.a )NREUMQ.a ();};' \
- 'NREUMQ.a=window.onload;window.onload=NREUMQ.f;};' \
- 'NREUMQ.push (["nrfj","%s","%s","%s","%s",%d,%d,' \
- 'new Date ().getTime (),"%s","%s","%s","%s","%s"]);</script>'
- _rum_footer_long_fragment = '<script type="text/javascript">' \
- 'if (!NREUMQ.f ){NREU
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement