Module Expr Str Assign NameStore Str Import alias Import alias Import alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr CompareIn TupleLoad Str Str NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareIn Str SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr BoolOpAnd CompareGt Call NameLoad NameLoad Num CompareLt Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad ListLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Str Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad ListLoad Str Str ListLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num keyword Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num keyword Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad ListLoad Str Str ListLoad Str Str ListLoad Str Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index SubscriptLoad NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index SubscriptLoad NameLoad Index Num Index Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num keyword Num Expr Call AttributeLoad NameLoad attr ListLoad Str Str Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad Str Str Str Str Assign NameStore Call NameLoad ListComp TupleLoad AttributeLoad SubscriptLoad NameLoad Index Num attr SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr CompareGtE SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr CompareLtE SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr CompareGtE SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr CompareGtE SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num ListLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Dict SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num ListLoad ListLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad ListLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad ListLoad ListLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad ListLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad ListLoad ListLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad ListLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad ListLoad ListLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad ListLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad Assign NameStore ListLoad Assign NameStore Call NameLoad ListComp TupleLoad AttributeLoad SubscriptLoad NameLoad Index Num attr SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Num Assign NameStore ListLoad TupleLoad Str Num TupleLoad Str Num TupleLoad Str Num TupleLoad Str Num Assign NameStore ListComp TupleLoad AttributeLoad SubscriptLoad NameLoad Index Num attr SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore ListLoad TupleLoad NameLoad Str Num TupleLoad NameLoad Str Num TupleLoad NameLoad Str Num TupleLoad NameLoad Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore TupleLoad Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad Assign AttributeStore NameLoad attr Dict SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num ListLoad ListLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad ListLoad ListLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad ListLoad ListLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad TupleLoad Str Str Num NameLoad Assign NameStore ListLoad TupleLoad Str Num TupleLoad Str Num TupleLoad Str Num Assign NameStore ListComp TupleLoad AttributeLoad SubscriptLoad NameLoad Index Num attr SubscriptLoad NameLoad Index Num comprehension NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore ListLoad TupleLoad Str Str Num TupleLoad Str Str Num TupleLoad Str Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A Tests for the benchmark module. N/A __author__ tstromberg@google.com (Thomas Stromberg) N/A unittest N/A benchmark N/A mocks BenchmarkTest N/A N/A unittest TestCase N/A testCreateTestsWeighted N/A N/A self N/A N/A N/A b N/A N/A benchmark Benchmark N/A N/A N/A mocks MockNameServer N/A mocks GOOD_IP test_count 1000 N/A results N/A N/A b CreateTests N/A google.com live.com N/A N/A N/A self assertEquals N/A len results 1000 N/A N/A N/A self assertTrue N/A N/A A www.google.com. results N/A caches N/A x N/A x results N/A cache N/A x N/A 1 N/A N/A N/A self assertTrue N/A N/A N/A len caches 0 N/A N/A len caches 50 N/A testCreateTestsSingle N/A N/A self N/A N/A N/A b N/A N/A benchmark Benchmark N/A N/A N/A mocks MockNameServer N/A mocks GOOD_IP test_count 1 N/A results N/A N/A b CreateTests N/A A mail.google.com N/A N/A N/A self assertEquals results N/A N/A A mail.google.com N/A N/A N/A self assertRaises AssertionError N/A b CreateTests google.com N/A testCreateTestsChunkRecords N/A N/A self N/A N/A N/A b N/A N/A benchmark Benchmark N/A N/A N/A mocks MockNameServer N/A mocks GOOD_IP test_count 100 N/A results N/A N/A b CreateTests N/A A mail.google.com CNAME test.live.com select_mode chunk N/A N/A N/A self assertEquals results N/A N/A A mail.google.com N/A CNAME test.live.com N/A testEmptyRun N/A N/A self N/A N/A N/A ns_list N/A N/A N/A mocks MockNameServer N/A mocks GOOD_IP N/A b N/A N/A benchmark Benchmark ns_list test_count 3 run_count 2 N/A N/A N/A self assertRaises AssertionError N/A b Run N/A testRun N/A N/A self N/A N/A N/A ns_list N/A N/A N/A mocks MockNameServer N/A mocks GOOD_IP N/A N/A mocks MockNameServer N/A mocks PERFECT_IP N/A N/A mocks MockNameServer N/A mocks BROKEN_IP N/A N/A mocks MockNameServer N/A mocks SLOW_IP N/A b N/A N/A benchmark Benchmark ns_list test_count 3 run_count 2 N/A N/A N/A self assertRaises AssertionError N/A b Run N/A N/A N/A b CreateTests N/A A www.google.com N/A N/A N/A self assertEquals N/A b test_data N/A N/A A www.google.com N/A A www.google.com N/A A www.google.com N/A N/A N/A b Run N/A ips_tested N/A sorted N/A N/A x ip N/A x N/A b results N/A expected N/A 127.0.0.1 127.127.127.127 192.168.0.1 9.9.9.9 N/A N/A N/A self assertEquals ips_tested expected N/A N/A N/A self assertEquals N/A len N/A N/A b results N/A N/A ns_list N/A 0 2 N/A N/A N/A self assertEquals N/A len N/A N/A N/A b results N/A N/A ns_list N/A 0 N/A 0 3 N/A testNormalRun N/A N/A self N/A N/A N/A ns_list N/A N/A N/A mocks MockNameServer N/A mocks GOOD_IP N/A N/A mocks MockNameServer N/A mocks PERFECT_IP N/A N/A mocks MockNameServer N/A mocks BROKEN_IP N/A N/A mocks MockNameServer N/A mocks SLOW_IP N/A b N/A N/A benchmark Benchmark ns_list test_count 3 run_count 2 N/A N/A N/A b CreateTests N/A google.com live.com N/A N/A N/A b Run N/A expected N/A 127.0.0.1 127.127.127.127 192.168.0.1 9.9.9.9 N/A averages N/A dict N/A N/A N/A N/A x N/A 0 ip N/A x N/A 1 N/A x N/A N/A b ComputeAverages N/A N/A N/A self assertEquals N/A len averages 4 N/A N/A N/A self assertTrue N/A N/A averages N/A N/A mocks GOOD_IP 8 N/A N/A N/A self assertTrue N/A N/A averages N/A N/A mocks PERFECT_IP 5 N/A N/A N/A self assertTrue N/A N/A averages N/A N/A mocks BROKEN_IP 59 N/A N/A N/A self assertTrue N/A N/A averages N/A N/A mocks SLOW_IP 20 N/A N/A N/A self assertEquals N/A N/A b BestOverallNameServer N/A ns_list N/A 1 N/A N/A N/A self assertEquals N/A N/A b NearestNameServers count 2 N/A N/A ns_list N/A 1 N/A ns_list N/A 0 N/A testDigestion N/A N/A self N/A N/A N/A ns_list N/A N/A N/A mocks MockNameServer N/A mocks GOOD_IP N/A N/A mocks MockNameServer N/A mocks PERFECT_IP N/A N/A mocks MockNameServer N/A mocks BROKEN_IP N/A N/A mocks MockNameServer N/A mocks SLOW_IP N/A b N/A N/A benchmark Benchmark ns_list N/A good N/A N/A N/A ns_list N/A 0 FakeAnswer None N/A bad N/A N/A N/A ns_list N/A 0 FakeAnswer None no_answer True N/A N/A b results N/A N/A ns_list N/A 0 N/A ns_list N/A 1 N/A ns_list N/A 2 N/A ns_list N/A 3 N/A N/A N/A www.google.com. A 2.9 bad N/A google.com. A 9.8 good N/A www.google.com. A 9.9 good N/A N/A www.google.com. A 9.9 bad N/A google.com. A 9.9 good N/A www.google.com. A 9.8 good N/A N/A N/A www.google.com. A 3.4 good N/A google.com. A 3.4 good N/A www.google.com. A 3.6 good N/A N/A www.google.com. A 3.3 good N/A google.com. A 3.3 good N/A www.google.com. A 3.4 good N/A N/A N/A www.google.com. A 60 None N/A google.com. A 60 None N/A www.google.com. A 60 None N/A N/A www.google.com. A 60 None N/A google.com. A 60 None N/A www.google.com. A 60 None N/A N/A N/A www.google.com. A 26.25 good N/A google.com. A 26.3 good N/A www.google.com. A 26.1 good N/A N/A www.google.com. A 26.4 good N/A google.com. A 12.4 bad N/A www.google.com. A 26.8 good N/A expected N/A N/A averages N/A dict N/A N/A N/A N/A x N/A 0 ip N/A x N/A 1 N/A x N/A N/A b ComputeAverages N/A N/A N/A self assertEquals N/A averages N/A N/A mocks GOOD_IP 8.7 N/A N/A N/A self assertEquals N/A averages N/A N/A mocks PERFECT_IP 3.4 N/A N/A N/A self assertEquals N/A averages N/A N/A mocks BROKEN_IP 60 N/A N/A N/A self assertEquals N/A averages N/A N/A mocks SLOW_IP 24.0416666667 N/A expected N/A N/A 127.127.127.127 3.3 N/A 127.0.0.1 9.8 N/A 9.9.9.9 26.1 N/A 192.168.0.1 60 N/A fastest N/A N/A N/A N/A x N/A 0 ip N/A x N/A 1 N/A x N/A N/A b FastestNameServerResult N/A N/A N/A self assertEquals fastest expected N/A expected N/A N/A None #### 3.3 N/A None ########## 9.8 N/A None ########################### 26.1 N/A None ############################################################ 60 N/A N/A N/A self assertEquals N/A N/A b _LowestLatencyAsciiChart expected N/A testFastest N/A N/A self N/A N/A N/A ns_list N/A N/A N/A mocks MockNameServer X name X N/A N/A mocks MockNameServer O name O N/A N/A mocks MockNameServer U name U N/A b N/A N/A benchmark Benchmark ns_list N/A good N/A N/A N/A ns_list N/A 0 FakeAnswer None N/A N/A b results N/A N/A ns_list N/A 0 N/A ns_list N/A 1 N/A ns_list N/A 2 N/A N/A N/A www.microsoft.com. A 3.08799743652 good N/A www.youku.com. A 2.25901603699 good N/A www.orkut.co.in. A 25.5119800568 good N/A cache-9.ku6.com. A 1013.63921165 good N/A wsj.com. A 2.36392021179 good N/A www.imagevenue.com. A 2.66885757446 good N/A www.travian.ae. A 2.51603126526 good N/A www.fotolog.net. A 2.67505645752 good N/A www.torrentz.com. A 2.78115272522 good N/A www.wer-kennt-wen.de. A 2.70700454712 good N/A N/A N/A www.microsoft.com. A 82.4999809265 good N/A www.youku.com. A 81.9911956787 good N/A www.orkut.co.in. A 82.377910614 good N/A cache-9.ku6.com. A 1141.14999771 good N/A wsj.com. A 84.3341350555 good N/A www.imagevenue.com. A 84.282875061 good N/A www.travian.ae. A 84.0361118317 good N/A www.fotolog.net. A 84.7501754761 good N/A www.torrentz.com. A 84.5170021057 good N/A www.wer-kennt-wen.de. A 83.9800834656 good N/A N/A N/A www.microsoft.com. A 12.5079154968 good N/A www.youku.com. A 357.068061829 good N/A www.orkut.co.in. A 46.4999675751 good N/A cache-9.ku6.com. A 697.60799408 good N/A wsj.com. A 87.1598720551 good N/A www.imagevenue.com. A 11.9979381561 good N/A www.travian.ae. A 11.4920139313 good N/A www.fotolog.net. A 12.0871067047 good N/A www.torrentz.com. A 12.598991394 good N/A www.wer-kennt-wen.de. A 11.7709636688 good N/A expected N/A N/A G 2.25901603699 N/A U 11.4920139313 N/A O 81.9911956787 N/A fastest N/A N/A N/A N/A x N/A 0 ip N/A x N/A 1 N/A x N/A N/A b FastestNameServerResult N/A N/A N/A self assertEquals fastest expected N/A expected N/A N/A X ## 2.25901603699 N/A U ######## 11.4920139313 N/A O ##################################################### 81.9911956787 N/A N/A N/A self assertEquals N/A N/A b _LowestLatencyAsciiChart expected N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main