def test_plot_histogramm(self): the_list = [(154234234, 3.0), (2323232, 2.0), (5645343, 1.0)] us = UserStats('userid', 'itemid') pH = Plot_Helper() pH.make_plot(the_list)
if (SAVE_DIMENSION_LIST): dimension = 'user_ids' dL = DimensionListModel( dimension ) if(debug): print "userid:\t" + str(flattenedJson['client_id']) dL.save( dimension_id = flattenedJson['client_id'], timestamp = timestamp_sec ) """ n += 1 if ( n % cycle_count == 0 and debug2): print n if (not debug3): result = r.fetch_row(maxrows = n_maxrows) # fetch N row maximum else: result = False if (not debug3): db.close() #close the database connection replay_time = time2.time() - replay_time print "time it took: " + str(replay_time) print 'It took {0:1f} seconds per item'.format(replay_time/n) us = UserStats('userid', 'itemid') the_list = us.get_Top_N('userid', 100) print the_list pH = Plot_Helper() pH.make_plot(the_list)