benchmark

package
v0.0.0-...-5118725 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package benchmark provides a simple benchmark for easyjson against default serialization and ffjson. The data example is taken from https://dev.twitter.com/rest/reference/get/search/tweets

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entities

type Entities struct {
	Hashtags     []Hashtag `json:"hashtags"`
	Urls         []*string `json:"urls"`
	UserMentions []*string `json:"user_mentions"`
}

type Hashtag

type Hashtag struct {
	Indices []int  `json:"indices"`
	Text    string `json:"text"`
}

type LargeStruct

type LargeStruct struct {
	SearchMetadata SearchMetadata `json:"search_metadata"`
	Statuses       []Status       `json:"statuses"`
}

type SearchMetadata

type SearchMetadata struct {
	CompletedIn float64 `json:"completed_in"`
	Count       int     `json:"count"`
	MaxID       int     `json:"max_id"`
	MaxIDStr    string  `json:"max_id_str"`
	NextResults string  `json:"next_results"`
	Query       string  `json:"query"`
	RefreshURL  string  `json:"refresh_url"`
	SinceID     int     `json:"since_id"`
	SinceIDStr  string  `json:"since_id_str"`
}

type Status

type Status struct {
	Contributors         *string        `json:"contributors"`
	Coordinates          *string        `json:"coordinates"`
	CreatedAt            string         `json:"created_at"`
	Entities             Entities       `json:"entities"`
	Favorited            bool           `json:"favorited"`
	Geo                  *string        `json:"geo"`
	ID                   int64          `json:"id"`
	IDStr                string         `json:"id_str"`
	InReplyToScreenName  *string        `json:"in_reply_to_screen_name"`
	InReplyToStatusID    *string        `json:"in_reply_to_status_id"`
	InReplyToStatusIDStr *string        `json:"in_reply_to_status_id_str"`
	InReplyToUserID      *string        `json:"in_reply_to_user_id"`
	InReplyToUserIDStr   *string        `json:"in_reply_to_user_id_str"`
	Metadata             StatusMetadata `json:"metadata"`
	Place                *string        `json:"place"`
	RetweetCount         int            `json:"retweet_count"`
	Retweeted            bool           `json:"retweeted"`
	Source               string         `json:"source"`
	Text                 string         `json:"text"`
	Truncated            bool           `json:"truncated"`
	User                 User           `json:"user"`
}

type StatusMetadata

type StatusMetadata struct {
	IsoLanguageCode string `json:"iso_language_code"`
	ResultType      string `json:"result_type"`
}

type URL

type URL struct {
	ExpandedURL *string `json:"expanded_url"`
	Indices     []int   `json:"indices"`
	URL         string  `json:"url"`
}

type User

type User struct {
	ContributorsEnabled            bool         `json:"contributors_enabled"`
	CreatedAt                      string       `json:"created_at"`
	DefaultProfile                 bool         `json:"default_profile"`
	DefaultProfileImage            bool         `json:"default_profile_image"`
	Description                    string       `json:"description"`
	Entities                       UserEntities `json:"entities"`
	FavouritesCount                int          `json:"favourites_count"`
	FollowRequestSent              *string      `json:"follow_request_sent"`
	FollowersCount                 int          `json:"followers_count"`
	Following                      *string      `json:"following"`
	FriendsCount                   int          `json:"friends_count"`
	GeoEnabled                     bool         `json:"geo_enabled"`
	ID                             int          `json:"id"`
	IDStr                          string       `json:"id_str"`
	IsTranslator                   bool         `json:"is_translator"`
	Lang                           string       `json:"lang"`
	ListedCount                    int          `json:"listed_count"`
	Location                       string       `json:"location"`
	Name                           string       `json:"name"`
	Notifications                  *string      `json:"notifications"`
	ProfileBackgroundColor         string       `json:"profile_background_color"`
	ProfileBackgroundImageURL      string       `json:"profile_background_image_url"`
	ProfileBackgroundImageURLHTTPS string       `json:"profile_background_image_url_https"`
	ProfileBackgroundTile          bool         `json:"profile_background_tile"`
	ProfileImageURL                string       `json:"profile_image_url"`
	ProfileImageURLHTTPS           string       `json:"profile_image_url_https"`
	ProfileLinkColor               string       `json:"profile_link_color"`
	ProfileSidebarBorderColor      string       `json:"profile_sidebar_border_color"`
	ProfileSidebarFillColor        string       `json:"profile_sidebar_fill_color"`
	ProfileTextColor               string       `json:"profile_text_color"`
	ProfileUseBackgroundImage      bool         `json:"profile_use_background_image"`
	Protected                      bool         `json:"protected"`
	ScreenName                     string       `json:"screen_name"`
	ShowAllInlineMedia             bool         `json:"show_all_inline_media"`
	StatusesCount                  int          `json:"statuses_count"`
	TimeZone                       string       `json:"time_zone"`
	URL                            *string      `json:"url"`
	UtcOffset                      int          `json:"utc_offset"`
	Verified                       bool         `json:"verified"`
}

type UserEntities

type UserEntities struct {
	Description UserEntityDescription `json:"description"`
	URL         UserEntityURL         `json:"url"`
}

type UserEntityDescription

type UserEntityDescription struct {
	Urls []*string `json:"urls"`
}

type UserEntityURL

type UserEntityURL struct {
	Urls []URL `json:"urls"`
}

type XLStruct

type XLStruct struct {
	Data []LargeStruct
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL