This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pip install wrapt | |
python3.10 -Wall repro.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================================================================================ test session starts ============================================================================================= | |
platform linux2 -- Python 2.7.15, pytest-4.6.11, py-1.9.0, pluggy-0.13.1 | |
benchmark: 3.2.3 (defaults: timer=time.time disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000) | |
rootdir: /home/kyle/dev/dd-trace-py, inifile: tox.ini | |
plugins: benchmark-3.2.3 | |
collected 2 items | |
tests/benchmark.py .. [100%] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
import ddtrace | |
import random | |
from ddtrace.vendor.six.moves.queue import Queue, Full, Empty | |
from ddtrace.internal._queue import TraceQueue | |
# Old queue | |
class Q(Queue): | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ddtrace/api.py b/ddtrace/api.py | |
index 26891f5c..e3d64885 100644 | |
--- a/ddtrace/api.py | |
+++ b/ddtrace/api.py | |
@@ -58,6 +58,7 @@ class Response(object): | |
:rtype: ``Response`` | |
:returns: A new ``Response`` | |
""" | |
+ assert resp.status == 200 | |
return cls( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pytest.mark.benchmark(group="start_span", min_time=0.005) | |
def test_tracer_start_span(benchmark, tracer): | |
benchmark(tracer.start_span, "benchmark") | |
@pytest.mark.benchmark(group="start_span", min_time=0.005) | |
def test_tracer_start_span_no_process_check(benchmark, tracer): | |
benchmark(tracer.start_span2, "benchmark") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyximport; pyximport.install() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/Users/kyle.verhoog/.pyenv/versions/3.6.10/lib/python3.6/threading.py", line 916, in _bootstrap_inner | |
self.run() | |
File "_test.py", line 48, in run | |
PERIODIC_THREAD_IDS.remove(self.ident) | |
KeyError: 123145450659840 | |
Traceback (most recent call last): | |
File "_test.py", line 173, in <module> | |
test() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ranq2(): | |
"""Generator for pseudorandom 64-bit integers. | |
This algorithm is from Numeric Recipes Chapter 7 (Ranq2). | |
""" | |
j = compat.getrandbits(64) | |
v = 4101842887655102017 | |
w = 1 | |
v ^= j |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tracers/sanic_opentracer.py b/tracers/sanic_opentracer.py | |
index ab42f5a..2eecdce 100644 | |
--- a/tracers/sanic_opentracer.py | |
+++ b/tracers/sanic_opentracer.py | |
@@ -16,6 +16,7 @@ def init_tracer(app_name, agent_hostname, agent_port): | |
scope_manager=ContextVarsScopeManager(), | |
) | |
set_global_tracer(tracer) | |
+ | |
return tracer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
why waste time say lot word when few word do trick? | |
my mind is going a mile an hour | |
How do I feel about losing the sale? It's like if Michael Phelps, came out of retirement, jumped in the pool, bellyflopped and drowned. | |
I decided to stay home, eat a bunch of tacos in my basement. Now my basement smells like tacos. You can't air out a basement. And taco air is heavy. It settles at the lowest point. |
NewerOlder