Skip to content

Instantly share code, notes, and snippets.

@jdimatteo
jdimatteo / gist:c223668095392e629ca01aadada4171c
Created September 12, 2022 21:48
repeated struct example with python-bigquery-sqlalchemy
import sqlalchemy
import sqlalchemy.ext.declarative
import sqlalchemy_bigquery
import os
Base = sqlalchemy.ext.declarative.declarative_base()
class Foo2(Base):
__tablename__ = 'foo2'
(venv) jdimatteo@dimo:~/dev/great_expectations_fork_2$ py.test-benchmark compare --name long tests/performance/results/*.json --columns min
----------------------------------------------------------- benchmark: 144 tests -----------------------------------------------------------
Name (time in s) Min
--------------------------------------------------------------------------------------------------------------------------------------------
tests/performance/test_bigquery_benchmarks.py::test_taxi_trips_benchmark[1-True-V3] (initial_baseline_run_3) 3.2818 (1.0)
tests/performance/test_bigquery_benchmarks.py::test_taxi_trips_benchmark[1-False-V3] (initial_baseline_run_2) 3.3227 (1.01)
tests/performance/test_bigquery_benchmarks.py::test_taxi_trips_benchmark[1-True-V3] (initial_baseline_run_2) 3.5200 (1.07)
tests/performance/test_bigquery_bench
"""
Pickle vs JSON by Konstantin Kovshenin
Feel free to use this code as you wish
Discussions: http://kovshenin.com/archives/pickle-vs-json-which-is-faster/
Author: Konstantin Kovshenin -- http://kovshenin.com
Written in December 2010 for Python 2.6
"""
import json as simplejson # json is faster than simplejson